Mercury Bugs - mercury
View Issue Details
0000322mercuryBugpublic2014-03-24 13:492014-05-15 13:28
Assigned To 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000322: mingw-w64 compiled program crashes
DescriptionMercury 14.01 branch

Cross-compiling with x86_64-w64-mingw32-gcc from Ubuntu
gcc version 4.6.3 (GCC)

For the given (small) test program:

asm_fast.gc CRASH
asm_jump.gc OK
reg.gc OK
none.gc OK
hlc.gc OK
TagsNo tags attached.
Attached Files? bug.m (204) 2014-03-24 13:49

2014-03-25 11:03   
I also tried gcc 4.8.2 as built from the MXE project. The results for the same test case are:

asm_fast.gc OK
asm_jump.gc CRASH
reg.gc OK
none.gc OK

For a bigger program (prince) the results are:

asm_fast.gc CRASH
asm_jump.gc CRASH
reg.gc OK
none.gc OK

I'm not going to chase this any further now, but we should document the problem in the readme.
2014-05-13 15:34   
Have you tried the native Windows versions of GCC with this, or just the cross-compiler?
2014-05-13 15:52   
I'm pretty sure I did.
2014-05-15 13:28   
asm_fast.gc is ok with gcc 4.8.1 (mingw-builds package).

Issue History
2014-03-24 13:49wangpNew Issue
2014-03-24 13:49wangpFile Added: bug.m
2014-03-25 11:03wangpNote Added: 0000655
2014-05-13 15:34juliensfNote Added: 0000683
2014-05-13 15:52wangpNote Added: 0000684
2014-05-15 13:28juliensfNote Added: 0000685