This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
PCH tests fail on sparc-sun-solaris2.7
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: geoffk at geoffk dot org
- Cc: gcc-bugs at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Mon, 13 Jan 2003 16:16:50 -0500 (EST)
- Subject: PCH tests fail on sparc-sun-solaris2.7
Geoff - as seen here:
http://gcc.gnu.org/ml/gcc-testresults/2003-01/msg00571.html
pretty much all of the PCH tests fail on sparc-sun-solaris2.7.
Looking in the log file, all of the error messages look like this:
> gcc.dg/pch/global-1.c:-71: sorry, unimplemented: had to relocate PCH
> gcc.dg/pch/global-1.c:-71: internal compiler error: Segmentation Fault
(Sometimes the line number was -70 or -72 for the various other tests.)
The g++ tests fail the same way.
I looked in gcc.dg/pch/pch.exp and guessed that I had to generate the
PCH file by hand and rename it to *.hp.pch. (Is that right?) Then I
ran cc1 on global-1.c under gdb and got an invalid memory reference as
you can see below. I'm not sure what I need to provide for you to
reproduce it in a cross config. PCH perhaps requires us to update our
bug reporting instructions slightly?
--Kaveh
> (gdb) run -quiet -v -I. -iprefix
> /teal/tmpdisk/ghazi/gcc-testing/34/build/gcc/../lib/gcc-lib/sparc-sun-solaris2.7/3.4/
> -isystem /teal/tmpdisk/ghazi/gcc-testing/34/build/gcc/include
> -D__GNUC__=3 -D__GNUC_MINOR__=4 -D__GNUC_PATCHLEVEL__=0 -Dsparc
> -D__sparc__ -D__sparc -D__GCC_NEW_VARARGS__ -Acpu=sparc
> -Amachine=sparc
> /teal/tmpdisk/ghazi/gcc-testing/34/egcc-CVS20030112/gcc/testsuite/gcc.dg/pch/global-1.c
> -quiet -dumpbase global-1.c -auxbase-strip global-1.s -O0 -version -o
> global-1.s
> Starting program: /teal/tmpdisk/ghazi/gcc-testing/34/build/gcc/cc1
> -quiet -v -I. -iprefix
> /teal/tmpdisk/ghazi/gcc-testing/34/build/gcc/../lib/gcc-lib/sparc-sun-solaris2.7/3.4/
> -isystem /teal/tmpdisk/ghazi/gcc-testing/34/build/gcc/include
> -D__GNUC__=3 -D__GNUC_MINOR__=4 -D__GNUC_PATCHLEVEL__=0 -Dsparc
> -D__sparc__ -D__sparc -D__GCC_NEW_VARARGS__ -Acpu=sparc
> -Amachine=sparc
> /teal/tmpdisk/ghazi/gcc-testing/34/egcc-CVS20030112/gcc/testsuite/gcc.dg/pch/global-1.c
> -quiet -dumpbase global-1.c -auxbase-strip global-1.s -O0 -version -o
> global-1.s
>
> GNU C version 3.4 20030112 (experimental) (sparc-sun-solaris2.7)
> compiled by GNU C version 3.4 20030112 (experimental).
> ignoring nonexistent directory
> "/teal/tmpdisk/ghazi/gcc-testing/34/build/lib/gcc-lib/sparc-sun-solaris2.7/3.4/include"
> ignoring nonexistent directory
> "/teal/tmpdisk/ghazi/gcc-testing/34/build/lib/gcc-lib/sparc-sun-solaris2.7/3.4/../../../../sparc-sun-solaris2.7/include"
> ignoring nonexistent directory "NONE/include"
> ignoring nonexistent directory
> "/usr/local/lib/gcc-lib/sparc-sun-solaris2.7/3.4/include"
> ignoring nonexistent directory
> "/usr/local/sparc-sun-solaris2.7/include"
> #include "..." search starts here:
> #include <...> search starts here:
> .
> /teal/tmpdisk/ghazi/gcc-testing/34/build/gcc/include
> /usr/local/include
> /usr/include
> End of search list.
> /teal/tmpdisk/ghazi/gcc-testing/34/egcc-CVS20030112/gcc/testsuite/gcc.dg/pch/global-1.c:-70: sorry, unimplemented: had to relocate PCH
> Program received signal SIGSEGV, Segmentation fault.
> reset_ht (r=0x440330, h=0xafafafbb, unused=0x0) at
> ../../egcc-CVS20030112/gcc/cpppch.c:552
> 552 if (h->type != NT_VOID
> (gdb) bt
> #0 reset_ht (r=0x440330, h=0xafafafbb, unused=0x0) at ../../egcc-CVS20030112/gcc/cpppch.c:552
> #1 0x000a3ba0 in ht_forall (table=0x40b4a0, cb=0xa5bbc <reset_ht>, v=0x0) at ../../egcc-CVS20030112/gcc/hashtable.c:235
> #2 0x000a5c18 in cpp_read_state (r=0x440330, name=0x4098e8 "global-1.hp.pch", f=0x409790, data=0x4467b0)
> at ../../egcc-CVS20030112/gcc/cpppch.c:583
> #3 0x000923e0 in c_common_read_pch (pfile=0x440330, name=0x4098e8 "global-1.hp.pch", fd=4779608,
> orig_name=0x4098e8 "global-1.hp.pch") at ../../egcc-CVS20030112/gcc/c-pch.c:220
> #4 0x0009e5ac in stack_include_file (pfile=0x440330, inc=0x48cc38) at ../../egcc-CVS20030112/gcc/cppfiles.c:437
> #5 0x0009eca8 in _cpp_execute_include (pfile=0x440330, header=0x4405b8, type=IT_INCLUDE)
> at ../../egcc-CVS20030112/gcc/cppfiles.c:828
> #6 0x0009282c in _cpp_handle_directive (pfile=0x440330, indented=0) at ../../egcc-CVS20030112/gcc/cpplib.c:443
> #7 0x00095dd8 in _cpp_lex_token (pfile=0x440330) at ../../egcc-CVS20030112/gcc/cpplex.c:864
> #8 0x0009962c in cpp_get_token (pfile=0x440330) at ../../egcc-CVS20030112/gcc/cppmacro.c:1123
> #9 0x00047240 in c_lex (value=0x3a6ea0) at ../../egcc-CVS20030112/gcc/c-lex.c:683
> #10 0x0003e748 in _yylex () at c-parse.y:2953
> #11 0x0003e574 in yylex () at c-parse.y:3061
> #12 0x0003c7d0 in yyparse () at c-p21554.c:2479
> #13 0x00046ce4 in c_common_parse_file (set_yydebug=0) at ../../egcc-CVS20030112/gcc/c-lex.c:165
> #14 0x00284d54 in compile_file () at ../../egcc-CVS20030112/gcc/toplev.c:2130
> #15 0x0028a898 in do_compile () at ../../egcc-CVS20030112/gcc/toplev.c:5353
> #16 0x0028a95c in toplev_main (argc=27, argv=0xffbef904) at ../../egcc-CVS20030112/gcc/toplev.c:5384
> (gdb) p h
> $1 = (cpp_hashnode *) 0xafafafbb
> (gdb) p *h
> Cannot access memory at address 0xafafafbb
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu