core dumps without -C flag, but none with -C

core dumps without -C flag, but none with -C


I'm running some fortran codecompiled with ifc version 7.0, which happens to interface to a solver written in C (SUPERLU) and compiled with gcc3.3.2.

When I compiled the fortran subroutine that calls the C codewith the -C flag, everything runs fine, but when I compiled without it, I got a core dump. Since I couldn't debug with the -C flag (as everything works fine if a little slowly), I added print statements to see where in the code the core dump was occuring. Strangely enough, if I put a print statement at the top of the fortran routine, things ran just fine, and I could even add the optimisation flags and get the correct output, but without the print statement, I get a core dump. The fortran subroutine has been used without problems in the past when it interfaces with a fortran solver, so perhaps it is related to the C code -- however, it doesn't seem like it is crashing in the C part.

Does anyone know anything about this?

1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.