This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

other/10757: Adding -fpic/-fPIC causes crash with PCH created without -fpic/-fPIC


>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 <URL:http://gcc.gnu.org/bugs.html> 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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]