http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60736
Bug ID: 60736 Summary: Crash in preprocessor including stdc-predef.h when it does not exist on glibc-based systems Product: gcc Version: 4.8.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: preprocessor Assignee: unassigned at gcc dot gnu.org Reporter: ian at airs dot com The file stdc-predef.h is special on glibc-based systems, as GCC pretends that it does a #include of that file first. My system (Ubuntu Precise) does not have stdc-predef.h. That case is supposed to work. However, if the program attempts to #include <stdc-predef.h>, which should fail, the compiler crashes rather than reporting an error. In other words, on a system without <stdc-predef.h>, this crashes: echo "#include <stdc-predef.h>" | gcc -x c - <stdin>:1:0: internal compiler error: Segmentation fault 0x9ad9cf crash_signal ../../gccgo3/gcc/toplev.c:336 0xf35ba6 cpp_errno(cpp_reader*, int, char const*) ../../gccgo3/libcpp/errors.c:233 0xf3af13 _cpp_find_file ../../gccgo3/libcpp/files.c:571 0xf3b621 _cpp_stack_include ../../gccgo3/libcpp/files.c:993 0xf32b20 do_include_common ../../gccgo3/libcpp/directives.c:793 0xf336c0 _cpp_handle_directive ../../gccgo3/libcpp/directives.c:492 0xf40ad4 _cpp_lex_token ../../gccgo3/libcpp/lex.c:2067 0xf45887 cpp_get_token_1 ../../gccgo3/libcpp/macro.c:2362 0x5ee37a c_lex_with_flags(tree_node**, unsigned int*, unsigned char*, int) ../../gccgo3/gcc/c-family/c-lex.c:302 0x584a93 c_lex_one_token ../../gccgo3/gcc/c/c-parser.c:228 0x5a389d c_parser_peek_token ../../gccgo3/gcc/c/c-parser.c:408 0x5a389d c_parse_file() ../../gccgo3/gcc/c/c-parser.c:13809 0x5f6894 c_common_parse_file() ../../gccgo3/gcc/c-family/c-opts.c:1056 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions.