http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59957
Bug ID: 59957 Summary: ICE in read_line_num when re-#define-ing a -DVAR=... Product: gcc Version: 4.9.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org Running gcc -c -DNDEBUG=1 test.c on the following code will give an ICE: #ifndef DEBUG #define NDEBUG /* Re-define NDEBUG - should warn but not ICE */ #endif #include <assert.h> will give an ICE with 4.9: 0xfa2248 read_line_num ../../gcc/input.c:603 0xfa2248 location_get_source_line(expanded_location, int*) ../../gcc/input.c:702 0xf9cf4b diagnostic_show_locus(diagnostic_context*, diagnostic_info const*) ../../gcc/diagnostic.c:304 0xf9df8b diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*) ../../gcc/diagnostic.c:800 0x635024 c_cpp_error(cpp_reader*, int, int, unsigned int, unsigned int, char const*, __va_list_tag (*) [1]) ../../gcc/c-family/c-common.c:9639 0xfac796 cpp_error_with_line(cpp_reader*, int, unsigned int, unsigned int, char const*, ...) ../../libcpp/errors.c:163 0xfbc7ef _cpp_create_definition ../../libcpp/macro.c:3124