The fprintf() on mingw gets to many parameters and thus produces a segmentation fault. config/rs6000/rs6000.c:9595 Original line: fprintf (file, HOST_WIDE_INT_PRINT_DEC "(%s)", INTVAL (XEXP (x, 1)), reg_names[ REGNO (XEXP (x, 0)) ]); The compiled code passes an additional parameter between INTVAL and reg_names.
workaround, splitting into separate fprintfS: fprintf(file,HOST_WIDE_INT_PRINT_DEC,INTVAL (XEXP (x,1))); fprintf(file,"(%s)",reg_names[ REGNO (XEXP (x,0)) ]); Note: It is very likely a bug in the mingw32 implementation. -- Summary: print_address_operand produces segmentation fault Product: gcc Version: 3.4.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: bastian42 at monlynx dot de CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: mingw32 GCC target triplet: powerpc-elf http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18919