public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/102120] New: expected tree that contains 'decl common' structure, have 'identifier_node' in dump_aggr_type, at cp/error.c:786
@ 2021-08-29 18:47 blubban at gmail dot com
2021-08-29 19:07 ` [Bug c++/102120] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: blubban at gmail dot com @ 2021-08-29 18:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102120
Bug ID: 102120
Summary: expected tree that contains 'decl common' structure,
have 'identifier_node' in dump_aggr_type, at
cp/error.c:786
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blubban at gmail dot com
Target Milestone: ---
Input:
union U {
int value;
constexpr ~U() noexcept { }
};
constexpr int z() {
U* array = new U[5];
int result = array[3].value;
delete[] array;
return result;
}
constexpr int zz = z();
Compile with -std=c++20.
Expected output (I get this if I remove the union's dtor, or change the array
to a single object):
<source>:13:21: in 'constexpr' expansion of 'z()'
<source>:13:22: error: the content of uninitialized storage is not usable in a
constant expression
13 | constexpr int zz = z();
| ^
<source>:7:23: note: allocated here
7 | U* array = new U[5];
| ^
Actual output on GCC 11.2:
'
<source>:13: confused by earlier errors, bailing out
Yes, those two lines are the entirety of its output.
GCC trunk is slightly better, but still asks for a bug report:
'
<source>:13:21: in 'constexpr' expansion of 'z()'
tree check: expected tree that contains 'decl common' structure, have
'identifier_node' in dump_aggr_type, at cp/error.c:786
13 | constexpr int zz = z();
| ^
0x1f30289 internal_error(char const*, ...)
???:0
0x6bb645 tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
???:0
0x1f4c781 pp_format(pretty_printer*, text_info*)
???:0
0x1f2eeb5 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
???:0
0x1f2fde9 error(char const*, ...)
???:0
0xae3d0a store_init_value(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
???:0
0x89b0c9 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
???:0
0x9d09a5 c_parse_file()
???:0
0xb55af2 c_common_parse_file()
???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Compiler Explorer: https://godbolt.org/z/WETs8jbMG
Posted by user konstantinua00 on the Compiler Explorer Discord, who may or may
not have found it via someone else.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/102120] expected tree that contains 'decl common' structure, have 'identifier_node' in dump_aggr_type, at cp/error.c:786
2021-08-29 18:47 [Bug c++/102120] New: expected tree that contains 'decl common' structure, have 'identifier_node' in dump_aggr_type, at cp/error.c:786 blubban at gmail dot com
@ 2021-08-29 19:07 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-29 19:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102120
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
It is ICEing while printing out the error message :).
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-29 19:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-29 18:47 [Bug c++/102120] New: expected tree that contains 'decl common' structure, have 'identifier_node' in dump_aggr_type, at cp/error.c:786 blubban at gmail dot com
2021-08-29 19:07 ` [Bug c++/102120] " pinskia 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).