This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/13476] New: wrong code with -O3 -fPIC (segmentation fault)
- From: "strasbur at chkw386 dot ch dot pwr dot wroc dot pl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Dec 2003 11:49:00 -0000
- Subject: [Bug c/13476] New: wrong code with -O3 -fPIC (segmentation fault)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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
--
Summary: wrong code with -O3 -fPIC (segmentation fault)
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: strasbur at chkw386 dot ch dot pwr dot wroc dot pl
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i386-slackware-linux
GCC host triplet: i386-slackware-linux
GCC target triplet: i386-slackware-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13476