https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89342
Bug ID: 89342 Summary: ICE in maybe_default_option, at opts.c:347 Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Affected by options -O[gs012] down to at least gcc-5, compiles of course with -O3 or -Ofast (not sure if legal) : $ cat z1.c __attribute__((optimize("Ofast"))) void foo () { __attribute__((optimize("align-functions=16"))) void bar () {} } $ gcc-9-20190210 -c z1.c -O3 $ $ gcc-9-20190210 -c z1.c z1.c: In function 'foo': z1.c:5:3: internal compiler error: in maybe_default_option, at opts.c:347 5 | void bar () {} | ^~~~ 0x127e18f maybe_default_option ../../gcc/opts.c:347 0x127fcfb maybe_default_options ../../gcc/opts.c:433 0x127fcfb default_options_optimization(gcc_options*, gcc_options*, cl_decoded_option*, unsigned int, unsigned int, unsigned int, cl_option_handlers const*, diagnostic_context*) ../../gcc/opts.c:652 0x9c0cf9 decode_options(gcc_options*, gcc_options*, cl_decoded_option*, unsigned int, unsigned int, diagnostic_context*, void (*)()) ../../gcc/opts-global.c:308 0x668256 parse_optimize_options(tree_node*, bool) ../../gcc/c-family/c-common.c:5731 0x68fd87 handle_optimize_attribute ../../gcc/c-family/c-attribs.c:3893 0x5d5e57 decl_attributes(tree_node**, tree_node*, int, tree_node*) ../../gcc/attribs.c:719 0x5ed501 start_function(c_declspecs*, c_declarator*, tree_node*) ../../gcc/c/c-decl.c:8907 0x6300d8 c_parser_declaration_or_fndef ../../gcc/c/c-parser.c:2258 0x62f46a c_parser_compound_statement_nostart ../../gcc/c/c-parser.c:5070 0x62f556 c_parser_compound_statement ../../gcc/c/c-parser.c:4982 0x630cca c_parser_declaration_or_fndef ../../gcc/c/c-parser.c:2354 0x635d73 c_parser_external_declaration ../../gcc/c/c-parser.c:1653 0x636839 c_parser_translation_unit ../../gcc/c/c-parser.c:1534 0x636839 c_parse_file() ../../gcc/c/c-parser.c:19842 0x67cca0 c_common_parse_file() ../../gcc/c-family/c-opts.c:1155