This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/32219] New: optimizer causes wrong code in pic/hidden/weak symbol checking.
- From: "pluto at agmk dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Jun 2007 09:38:05 -0000
- Subject: [Bug target/32219] New: optimizer causes wrong code in pic/hidden/weak symbol checking.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
following testcase causes gpf on i386.
$ cat exe.c
extern void f() __attribute__((weak,visibility("hidden")));
extern int puts( char const* );
int main()
{
f ? f() : puts( "f == null, skipped." );
return 0;
}
$ gcc exe.c -fPIE --save-temps -m32 -O1 && ./a.out
Segmentation fault
this fails on i386 with gcc 3.4.5, 4.0, 4.1 and 4.2 (4.3 not tested).
x86_64 and ppc works fine, so it looks like a ix86 target bug.
--
Summary: optimizer causes wrong code in pic/hidden/weak symbol
checking.
Product: gcc
Version: 4.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pluto at agmk dot net
GCC target triplet: i386-gnu-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32219