https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79906

            Bug ID: 79906
           Summary: ICE in rs6000_inner_target_options, at
                    config/rs6000/rs6000.c:39199
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
  Target Milestone: ---
            Target: ppc64le-linux-gnu

Target attribute with invalid value should produce error message instead of
ICE:

$ ppc64le-linux-gnu-g++
/home/marxin/Programming/gcc/gcc/testsuite/g++.dg/ext/mv8.C 
/home/marxin/Programming/gcc/gcc/testsuite/g++.dg/ext/mv8.C:5:15: internal
compiler error: in rs6000_inner_target_options, at config/rs6000/rs6000.c:39199
 void foo (void) // { dg-error "not a string" }
               ^
0x108715c rs6000_inner_target_options
        .././../gcc/config/rs6000/rs6000.c:39199
0x1086e1c rs6000_inner_target_options
        .././../gcc/config/rs6000/rs6000.c:39189
0x109d3a7 rs6000_valid_attribute_p
        .././../gcc/config/rs6000/rs6000.c:39297
0x8cabf1 handle_target_attribute
        .././../gcc/c-family/c-attribs.c:3028
0x854a53 decl_attributes(tree_node**, tree_node*, int)
        .././../gcc/attribs.c:548
0x6e5a2e cplus_decl_attributes(tree_node**, tree_node*, int)
        .././../gcc/cp/decl2.c:1436
0x5b3e36 grokfndecl
        .././../gcc/cp/decl.c:8859
0x634462 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*,
decl_context, int, tree_node**)
        .././../gcc/cp/decl.c:12225
0x636d56 start_function(cp_decl_specifier_seq*, cp_declarator const*,
tree_node*)
        .././../gcc/cp/decl.c:15137
0x737622 cp_parser_function_definition_from_specifiers_and_declarator
        .././../gcc/cp/parser.c:26129
0x737622 cp_parser_init_declarator
        .././../gcc/cp/parser.c:19141
0x73830f cp_parser_simple_declaration
        .././../gcc/cp/parser.c:12773
0x73906a cp_parser_block_declaration
        .././../gcc/cp/parser.c:12599
0x740fde cp_parser_declaration
        .././../gcc/cp/parser.c:12496
0x741436 cp_parser_declaration_seq_opt
        .././../gcc/cp/parser.c:12372
0x741768 cp_parser_translation_unit
        .././../gcc/cp/parser.c:4366
0x741768 c_parse_file()
        .././../gcc/cp/parser.c:38427
0x8a4f72 c_common_parse_file()
        .././../gcc/c-family/c-opts.c:1107

Reply via email to