https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103012
Bug ID: 103012 Summary: ICE with #pragma GCC optimize followed by long line Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- t0.cc:1:26: internal compiler error: in linemap_add, at libcpp/line-map.c:502 1 | #pragma GCC optimize("Og") | ^ 0x2094272 linemap_add(line_maps*, lc_reason, unsigned int, char const*, unsigned int) /home/apinski/src/upstream-gcc/gcc/libcpp/line-map.c:502 0x2094486 linemap_line_start(line_maps*, unsigned int, unsigned int) /home/apinski/src/upstream-gcc/gcc/libcpp/line-map.c:827 0x2094798 linemap_position_for_column(line_maps*, unsigned int) /home/apinski/src/upstream-gcc/gcc/libcpp/line-map.c:898 0x208fd00 _cpp_lex_direct /home/apinski/src/upstream-gcc/gcc/libcpp/lex.c:2994 0x2091670 _cpp_lex_token /home/apinski/src/upstream-gcc/gcc/libcpp/lex.c:2810 0x207fddf lex_macro_node /home/apinski/src/upstream-gcc/gcc/libcpp/directives.c:601 0x20805a2 do_define /home/apinski/src/upstream-gcc/gcc/libcpp/directives.c:639 0x20836ef run_directive /home/apinski/src/upstream-gcc/gcc/libcpp/directives.c:589 0x20837a7 cpp_define(cpp_reader*, char const*) /home/apinski/src/upstream-gcc/gcc/libcpp/directives.c:2511 0x20837fb cpp_define_unused(cpp_reader*, char const*) /home/apinski/src/upstream-gcc/gcc/libcpp/directives.c:2520 0xc7a234 c_cpp_builtins_optimize_pragma(cpp_reader*, tree_node*, tree_node*) /home/apinski/src/upstream-gcc/gcc/gcc/c-family/c-cppbuiltin.c:600 0xc9c8e3 handle_pragma_optimize /home/apinski/src/upstream-gcc/gcc/gcc/c-family/c-pragma.c:997 0xb35c40 cp_parser_pragma /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:47773 0xb6cbfb cp_parser_toplevel_declaration /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:14852 0xb6cbfb cp_parser_toplevel_declaration /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:14843 0xb6cbfb cp_parser_translation_unit /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:4987 0xb6cbfb c_parse_file() /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:47832 0xc9a5ed c_common_parse_file() /home/apinski/src/upstream-gcc/gcc/gcc/c-family/c-opts.c:1237 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.