[Bug target/32219] New: optimizer causes wrong code in pic/hidden/weak symbol checking.
pluto at agmk dot net
gcc-bugzilla@gcc.gnu.org
Tue Jun 5 09:38:00 GMT 2007
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
More information about the Gcc-bugs
mailing list