https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91706
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-invalid-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2019-09-09
Target Milestone|--- |8.4
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.
The struct B type has a member
<type_decl 0x7ffff5e2eed8 type type <error_mark 0x7ffff680de40>
asm_written external nonlocal suppress-debug decl_6 VOID t.C:12:9
align:8 warn_if_not_align:0 context <record_type 0x7ffff60a8888 B>
result <typename_type 0x7ffff60a8150 type VOID
align:8 warn_if_not_align:0 symtab:0 alias-set -1 structural-equality
context <record_type 0x7ffff6098f18 conditional>
fullname <identifier_node 0x7ffff6826f00 type type <error_mark
0x7ffff680de40>
normal local bindings <0x7ffff5d40be0>>
chain <type_decl 0x7ffff5e2e000 type>>
>
which we don't expect. Frontend issue. It should have raised an error here?
> clang++ t.C
t.C:16:3: error: static_assert failed due to requirement 'B<std::vector<int>
>::type::value' "assertion failed"
static_assert(B<std::vector<int>>::type::value, "assertion failed");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
The ICE with GCC 9 is the same
note DECL_ORGINAL_TYPE is "sane" (well, 'void'). And dwarf2out has
25421 if (DECL_ORIGINAL_TYPE (decl))
25422 {
25423 type = DECL_ORIGINAL_TYPE (decl);
25424 if (type == error_mark_node)
25425 return;
25426
25427 gcc_assert (type != TREE_TYPE (decl));
25428 equate_type_number_to_die (TREE_TYPE (decl), type_die);
so it checks DECL_ORIGINAL_TYPE but then uses TREE_TYPE which actually
is error_mark_node.