#88 Code calling Fortran runs fine with MinGW-32 but hangs under MinGW-64

v1.0 (example)
open
nobody
Fortran (2)
5
2013-09-27
2013-09-27
Allen Cogbill
No

I'd like to report what I firmly believe to be a bug in the 64-bit version of MinGW. I've encountered the bug using gcc-4.7.1 as well as gcc-4.8.1. The problem has thus far only occurred when mixing C code with Fortran code. Single-stepping gdb indicates that, when calling a Fortran subroutine from C, the addresses of the arguments seem to mysteriously vanish at times. The result is that the codes hangs at that point.

Note that the Fortran codes is a legacy Fortran code that has been in heavy use for decades. The C code calling code has been in use for years with no such problems. Also, note that compiling and linking as a 32-bit target (identical source codes) produces a code with happily runs on the same problems that the 64-bit code hangs on.

I don't know if such a problem has been brought up before, but I wasn't able to locate a similar problem on this forum. There was a discussion of a similar problem related to OpenCL (http://devgurus.amd.com/message/1164914), but I doubt that such would be applicable to this issue.

Discussion