https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80207
Bug ID: 80207 Summary: ICE on invalid code in comptypes at cp/typeck.c:1434 Product: gcc Version: 7.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org Target Milestone: --- Host: x86_64-linux-gnu Target: arm-linux-gnueabi Created attachment 41055 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41055&action=edit test-case Following llvm test-case ICEs on trunk: $ arm-linux-gnueabi-g++ ~/Downloads/cxx0x-defaulted-functions.cpp -mflip-thumb /home/marxin/BIG/Programming/llvm-project/llvm/tools/clang/test/SemaCXX/cxx0x-defaulted-functions.cpp:3:13: error: ‘void fn()’ cannot be defaulted void fn() = default; // expected-error {{only special member}} ^~~~~~~ /home/marxin/BIG/Programming/llvm-project/llvm/tools/clang/test/SemaCXX/cxx0x-defaulted-functions.cpp:5:15: error: ‘void foo::fn()’ cannot be defaulted void fn() = default; // expected-error {{only special member}} ^~~~~~~ /home/marxin/BIG/Programming/llvm-project/llvm/tools/clang/test/SemaCXX/cxx0x-defaulted-functions.cpp:29:11: internal compiler error: canonical types differ for identical types void* (bar::)(int) noexcept (<uninstantiated>) and void* (bar::)(int) noexcept (<uninstantiated>) bar::~bar() = default; ^ 0x75f7df comptypes(tree_node*, tree_node*, int) .././../gcc/cp/typeck.c:1434 0x62d426 duplicate_decls(tree_node*, tree_node*, bool) .././../gcc/cp/decl.c:2195 0x5c1e0c grokfndecl .././../gcc/cp/decl.c:8927 0x641938 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*, decl_context, int, tree_node**) .././../gcc/cp/decl.c:12223 0x643266 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int, tree_node*, tree_node*, tree_node**) .././../gcc/cp/decl.c:4964 0x7446c9 cp_parser_init_declarator .././../gcc/cp/parser.c:19251 0x7453af cp_parser_simple_declaration .././../gcc/cp/parser.c:12773 0x74610a cp_parser_block_declaration .././../gcc/cp/parser.c:12599 0x74e05e cp_parser_declaration .././../gcc/cp/parser.c:12496 0x74e4b6 cp_parser_declaration_seq_opt .././../gcc/cp/parser.c:12372 0x74e7e8 cp_parser_translation_unit .././../gcc/cp/parser.c:4366 0x74e7e8 c_parse_file() .././../gcc/cp/parser.c:38423 0x8b2d52 c_common_parse_file() .././../gcc/c-family/c-opts.c:1107