This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/18919] New: print_address_operand produces segmentation fault
- From: "bastian42 at monlynx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Dec 2004 09:22:05 -0000
- Subject: [Bug c/18919] New: print_address_operand produces segmentation fault
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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