From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9580 invoked by alias); 5 Jun 2007 09:38:16 -0000 Received: (qmail 9538 invoked by uid 48); 5 Jun 2007 09:38:05 -0000 Date: Tue, 05 Jun 2007 09:38:00 -0000 Subject: [Bug target/32219] New: optimizer causes wrong code in pic/hidden/weak symbol checking. X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pluto at agmk dot net" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-06/txt/msg00260.txt.bz2 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