public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/103379] New: [12 Regression] ICE: tree check: expected class 'type', have 'declaration' (namespace_decl) in comptypes, at cp/typeck.c:1544
@ 2021-11-23 10:26 asolokha at gmx dot com
2021-11-23 20:12 ` [Bug c++/103379] " mpolacek at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: asolokha at gmx dot com @ 2021-11-23 10:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103379
Bug ID: 103379
Summary: [12 Regression] ICE: tree check: expected class
'type', have 'declaration' (namespace_decl) in
comptypes, at cp/typeck.c:1544
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: asolokha at gmx dot com
Target Milestone: ---
g++-12.0.0-alpha20211121 snapshot (g:da17c304e22ba256eba0b03710aa329115163b08)
ICEs when compiling the following testcase, extracted from
test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p7-cxx20.cpp from the clang
13.0.0 test suite, w/ -std=c++20:
namespace Nine {
namespace Q {
enum class Bob { a };
using Bob::a;
}
struct Foo {
using Q::a;
using Q::Bob::a;
};
}
% gcc-12.0.0 -std=c++20 -c tjgp3kjm.cpp
tjgp3kjm.cpp:9:17: internal compiler error: tree check: expected class 'type',
have 'declaration' (namespace_decl) in comptypes, at cp/typeck.c:1544
9 | using Q::Bob::a;
| ^
0x862e17 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/tree.c:8752
0x72ded8 tree_class_check(tree_node*, tree_code_class, char const*, int, char
const*)
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/tree.h:3564
0x72ded8 comptypes(tree_node*, tree_node*, int)
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/cp/typeck.c:1544
0xa84878 push_class_level_binding_1
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/cp/name-lookup.c:5490
0xa84a1e push_class_level_binding(tree_node*, tree_node*)
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/cp/name-lookup.c:5549
0xa84a1e pushdecl_class_level(tree_node*)
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/cp/name-lookup.c:5284
0xb62567 finish_member_declaration(tree_node*)
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/cp/semantics.c:3562
0xa98b81 finish_using_decl
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/cp/parser.c:21338
0xadd229 cp_parser_using_declaration
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/cp/parser.c:21469
0xab55e6 cp_parser_member_specification_opt
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/cp/parser.c:26668
0xab55e6 cp_parser_class_specifier_1
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/cp/parser.c:25738
0xab7ab7 cp_parser_class_specifier
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/cp/parser.c:26055
0xab7ab7 cp_parser_type_specifier
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/cp/parser.c:19220
0xab8a54 cp_parser_decl_specifier_seq
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/cp/parser.c:15794
0xab99d7 cp_parser_simple_declaration
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/cp/parser.c:15042
0xaeb015 cp_parser_declaration
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/cp/parser.c:14855
0xaea4f9 cp_parser_toplevel_declaration
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/cp/parser.c:14876
0xaea4f9 cp_parser_declaration_seq_opt
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/cp/parser.c:14629
0xaea953 cp_parser_namespace_body
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/cp/parser.c:21250
0xaea953 cp_parser_namespace_definition
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/cp/parser.c:21228
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/103379] ICE: tree check: expected class 'type', have 'declaration' (namespace_decl) in comptypes, at cp/typeck.c:1544
2021-11-23 10:26 [Bug c++/103379] New: [12 Regression] ICE: tree check: expected class 'type', have 'declaration' (namespace_decl) in comptypes, at cp/typeck.c:1544 asolokha at gmx dot com
@ 2021-11-23 20:12 ` mpolacek at gcc dot gnu.org
2021-11-24 14:39 ` marxin at gcc dot gnu.org
2021-11-24 14:46 ` mpolacek at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-11-23 20:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103379
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Last reconfirmed| |2021-11-23
Ever confirmed|0 |1
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed, but clang++ accepts it, so probably valid code.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/103379] ICE: tree check: expected class 'type', have 'declaration' (namespace_decl) in comptypes, at cp/typeck.c:1544
2021-11-23 10:26 [Bug c++/103379] New: [12 Regression] ICE: tree check: expected class 'type', have 'declaration' (namespace_decl) in comptypes, at cp/typeck.c:1544 asolokha at gmx dot com
2021-11-23 20:12 ` [Bug c++/103379] " mpolacek at gcc dot gnu.org
@ 2021-11-24 14:39 ` marxin at gcc dot gnu.org
2021-11-24 14:46 ` mpolacek at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-24 14:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103379
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Started to ICE after r11-5003-gd50310408f54e380, it was rejected before the
revision.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/103379] ICE: tree check: expected class 'type', have 'declaration' (namespace_decl) in comptypes, at cp/typeck.c:1544
2021-11-23 10:26 [Bug c++/103379] New: [12 Regression] ICE: tree check: expected class 'type', have 'declaration' (namespace_decl) in comptypes, at cp/typeck.c:1544 asolokha at gmx dot com
2021-11-23 20:12 ` [Bug c++/103379] " mpolacek at gcc dot gnu.org
2021-11-24 14:39 ` marxin at gcc dot gnu.org
@ 2021-11-24 14:46 ` mpolacek at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-11-24 14:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103379
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|ice-on-invalid-code |ice-on-valid-code
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Looks valid.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-11-24 14:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-23 10:26 [Bug c++/103379] New: [12 Regression] ICE: tree check: expected class 'type', have 'declaration' (namespace_decl) in comptypes, at cp/typeck.c:1544 asolokha at gmx dot com
2021-11-23 20:12 ` [Bug c++/103379] " mpolacek at gcc dot gnu.org
2021-11-24 14:39 ` marxin at gcc dot gnu.org
2021-11-24 14:46 ` mpolacek at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).