From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30390 invoked by alias); 12 May 2003 19:15:39 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 5463 invoked by uid 71); 12 May 2003 19:06:03 -0000 Resent-Date: 12 May 2003 19:06:03 -0000 Resent-Message-ID: <20030512190603.5462.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, ljrittle@acm.org Received: (qmail 1449 invoked by uid 48); 12 May 2003 18:42:32 -0000 Message-Id: <20030512184232.1422.qmail@sources.redhat.com> Date: Mon, 12 May 2003 19:15:00 -0000 From: ljrittle@acm.org Reply-To: ljrittle@acm.org To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: other/10757: Adding -fpic/-fPIC causes crash with PCH created without -fpic/-fPIC X-SW-Source: 2003-05/txt/msg01341.txt.bz2 List-Id: >Number: 10757 >Category: other >Synopsis: Adding -fpic/-fPIC causes crash with PCH created without -fpic/-fPIC >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Mon May 12 19:06:03 UTC 2003 >Closed-Date: >Last-Modified: >Originator: ljrittle@acm.org >Release: mainline 5/12 >Organization: >Environment: sol2.9 & ppclinux & i386-unknown-freebsd4.8 >Description: People on the libstdc++ mailing list found a problem with PCH and the -fpic flag that I traced to this root (multi-file) test case. >How-To-Repeat: ; echo >t.h ; echo >main.c 'int main() {}' ; g++ -o t.h.gch t.h ; g++ -include t.h -Winvalid-pch main.c ; g++ -include t.h -Winvalid-pch -fpic main.c main.c: In function `int main()': main.c:1: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. ; g++ -fpic main.c (Humm, at this point, I'd have thought that maybe something wasn't marked for PCH/GC properly in a region keyed by -fpic, but then I noticed:) ; g++ -fpic -o t.h.gch t.h ; g++ -include t.h -Winvalid-pch main.c cc1plus: warning: ./t.h.gch: not used because `__pic__' not defined ; g++ -include t.h -Winvalid-pch -fpic main.c I'm sorry, I have no time to debug this today. >Fix: >Release-Note: >Audit-Trail: >Unformatted: