Bug 13476

Summary: wrong code with -O3 -fPIC (segmentation fault)
Product: gcc Reporter: Krzysztof Strasburger <strasbur>
Component: cAssignee: Not yet assigned to anyone <unassigned>
Severity: normal CC: gcc-bugs
Priority: P2    
Version: 3.3.2   
Target Milestone: ---   
Host: i386-slackware-linux Target: i386-slackware-linux
Build: i386-slackware-linux Known to work:
Known to fail: Last reconfirmed:

Description Krzysztof Strasburger 2003-12-23 11:48:58 UTC
The following code is miscompiled (no error with -O2 -fPIC or
without -fPIC):
int xargc;
int iargcx() { return (xargc); }
int main(int argc, char **argv) {
xargc=argc; return (iargcx()); }

The function "iargcx" is responsible for the problem.
Command line: gcc -O3 -fPIC file.c, gcc configured with: ./configure --prefix=/usr --enable-languages=c --host=i386-slackware-linux --disable-libgcj --disable-nls
Comment 1 Andrew Pinski 2003-12-23 17:02:44 UTC
This is a dup of bug 10877 which means you have to have a newer binutils.

*** This bug has been marked as a duplicate of 10877 ***