------- Comment #3 from reichelt at gcc dot gnu dot org  2008-03-14 07:44 
-------
I still see the ICE on 4.2 branch, 4.3 branch and mainline (i686-pc-linux-gnu).
Here's the backtrace from mainline (4.3 branch and 4.2 branch crash in the same
position, and valgrind reports an invalid read at that position):

#0  0x08784cdd in _cpp_lex_direct (pfile=0x89a5070)
    at ../../gcc/libcpp/lex.c:897
Program received signal SIGSEGV, Segmentation fault.
0x08784cdd in _cpp_lex_direct (pfile=0x89a5070) at ../../gcc/libcpp/lex.c:897
897       if (buffer->need_line)
(gdb) bt
#0  0x08784cdd in _cpp_lex_direct (pfile=0x89a5070)
    at ../../gcc/libcpp/lex.c:897
#1  0x087858bd in _cpp_lex_token (pfile=0x89a5070)
    at ../../gcc/libcpp/lex.c:781
#2  0x08787b78 in cpp_get_token (pfile=0x89a5070)
    at ../../gcc/libcpp/macro.c:1190
#3  0x08788d24 in cpp_get_token_with_location (pfile=0x89a5070, loc=0xb7d9bf74)
    at ../../gcc/libcpp/macro.c:1271
#4  0x0804ccc0 in c_lex_with_flags (value=0xb7d9bf70, loc=0xb7d9bf74, 
    cpp_flags=0x0, lex_flags=0) at ../../gcc/gcc/c-lex.c:304
#5  0x080c60cb in c_lex_one_token (parser=0xb7d9bf6c, token=0xb7d9bf6c)
    at ../../gcc/gcc/c-parser.c:311
#6  0x080c6b40 in c_parser_skip_to_end_of_block_or_statement (
    parser=0xb7d9bf6c) at ../../gcc/gcc/c-parser.c:416
#7  0x080d157b in c_parser_declaration_or_fndef (parser=0xb7d9bf6c, 
    fndef_ok=1 '\001', empty_ok=0 '\0', nested=0 '\0', 
    start_attr_ok=<value optimized out>) at ../../gcc/gcc/c-parser.c:1263
#8  0x080d24a6 in c_parser_external_declaration (parser=0xb7d9bf6c)
    at ../../gcc/gcc/c-parser.c:1180
#9  0x080d324f in c_parse_file () at ../../gcc/gcc/c-parser.c:1082
#10 0x080b84b5 in c_common_parse_file (set_yydebug=0)
    at ../../gcc/gcc/c-opts.c:1280
#11 0x08351574 in toplev_main (argc=3, argv=0xbfa6b774)

Apparently pfile->buffer is 0.

I didn't use any special options, just plain "cc1 -quiet".


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35326

Reply via email to