------- Comment #11 from dominiq at lps dot ens dot fr 2009-11-16 14:29 ------- The following code triggers the problem on i686-apple-darwin9 at revision 154075 (+ patches from fortran-dev):
[ibook-dhum] f90/bug% cat complex-sign-add_red_1.c extern void exit (int); void check_add_float (void) { _Complex float a1; volatile _Complex float a2, b2, c2; a1 = (+ 1 == 1 ? + 1 == 1 ? 0.0f + 0.0if : 0.0f - 0.0if : + 1 == 1 ? -(0.0f - 0.0if) : -(0.0f + 0.0if)); a2 = (+ 1 == 1 ? + 1 == 1 ? 0.0f + 0.0if : 0.0f - 0.0if : + 1 == 1 ? -(0.0f - 0.0if) : -(0.0f + 0.0if)); b2 = (+ 1 == 1 ? + 1 == 1 ? 0.0f + 0.0if : 0.0f - 0.0if : + 1 == 1 ? -(0.0f - 0.0if) : -(0.0f + 0.0if)); c2 = a2 + b2; } int main (void) { check_add_float (); exit (0); } [ibook-dhum] f90/bug% gcc45 complex-sign-add_red_1.c -O1 -g -c [ibook-dhum] f90/bug% gcc45 complex-sign-add_red_1.o -O1 -g [ibook-dhum] f90/bug% dsymutil a.out Assertion failed: (orig_str), function FixReferences, file /SourceCache/dwarf_utilities/dwarf_utilities-70/source/DWARFdSYM.cpp, line 3641. Abort The reduced case does not trigger the error on powerpc-apple-darwin9 while the full test does. QUESTIONS: what does gcc 4.5 put in the a.out files that triggers (or not) the failure? How am I supposed to find it? Note that 'gcc45 complex-sign-add_red_1.c -O1 -g' triggers the same error, but in both cases the executable is produced and can be run (I did not tried to debug it). Also the dsymutil bug is not triggered at -O0. Finally 'gcc45 complex-sign-add_red_1.c -O1 -g -lm' does not gives any error due to the fact that dsymutil is not called. The -v option gives respectively: ... COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.5.8' '-O1' '-g' '-v' '-mtune=generic' dsymutil a.out Assertion failed: (orig_str), function FixReferences, file /SourceCache/dwarf_utilities/dwarf_utilities-70/source/DWARFdSYM.cpp, line 3641. gcc45: Internal error: Abort trap (program dsymutil) Please submit a full bug report. See <http://gcc.gnu.org/bugs.html> for instructions. and ... COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.5.8' '-O1' '-g' '-v' '-mtune=generic' Is this the intended behavior? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41473