public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/115431] New: ICE: tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in decl_template_parm_check, at cp/cp-tree.h:5131
@ 2024-06-11 9:57 iamanonymous.cs at gmail dot com
2024-06-11 17:52 ` [Bug c++/115431] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: iamanonymous.cs at gmail dot com @ 2024-06-11 9:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115431
Bug ID: 115431
Summary: ICE: tree check: expected tree that contains ‘decl
common’ structure, have ‘error_mark’ in
decl_template_parm_check, at cp/cp-tree.h:5131
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: iamanonymous.cs at gmail dot com
Target Milestone: ---
Target: x86_64
*******************************************************************************
Internal Compiler Error (ICE) when compiling a specific C++ code with GCC.
The error message specifically indicates an issue in decl_template_parm_check
at cp/cp-tree.h:5131.
*******************************************************************************
OS and Platform:
# uname -a
Linux ubuntu 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023
x86_64 x86_64 x86_64 GNU/Linux
*******************************************************************************
#g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/root/gdbtest/gcc/gcc-15/libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /root/gdbtest/gcc/obj/../gcc/configure
--prefix=/root/gdbtest/gcc/gcc-15 --enable-languages=c,c++,fortran,go
--disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.0.0 20240509 (experimental) (GCC)
*******************************************************************************
Program:
# cat constrained.ii
template <typename b> struct c { c( b)
} template <typename b> struct d : c<b> {
c<b>::c;
} template <typename b> d(b)->d<b>;
d a = [] < e f
*******************************************************************************
Command Lines:
# g++ -Wall -Wextra -pedantic -Werror -O2 -g -fsanitize=address,undefined
-fno-omit-frame-pointer -o bug.out constrained.ii
constrained.ii:1:45: error: expected ‘;’ at end of member declaration
1 | template <typename b> struct c { c( b)
| ^
| ;
constrained.ii:2:2: error: expected ‘;’ after struct definition
2 | } template <typename b> struct d : c<b> {
| ^
| ;
constrained.ii:3:3: error: access declarations are deprecated in favor of
using-declarations; suggestion: add the ‘using’ keyword [-Werror=deprecated]
3 | c<b>::c;
| ^~~~
constrained.ii:4:2: error: expected ‘;’ after struct definition
4 | } template <typename b> d(b)->d<b>;
| ^
| ;
constrained.ii:5:10: error: lambda templates are only available with
‘-std=c++20’ or ‘-std=gnu++20’ [-Werror=c++20-extensions]
5 | d a = [] < e f
| ^
constrained.ii:5:12: error: ‘e’ has not been declared
5 | d a = [] < e f
| ^
constrained.ii:5:15: error: expected ‘>’ at end of input
5 | d a = [] < e f
| ^
constrained.ii: In lambda function:
constrained.ii:5:15: error: expected ‘{’ at end of input
constrained.ii: At global scope:
constrained.ii:3:9: internal compiler error: tree check: expected tree that
contains ‘decl common’ structure, have ‘error_mark’ in
decl_template_parm_check, at cp/cp-tree.h:5131
3 | c<b>::c;
| ^
0x99ed98 tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
/root/gdbtest/gcc/obj/../gcc/gcc/tree.cc:9169
0x7f386f contains_struct_check(tree_node const*, tree_node_structure_enum, char
const*, int, char const*)
/root/gdbtest/gcc/obj/../gcc/gcc/tree.h:4058
0x7f386f decl_template_parm_check(tree_node const*, char const*, int, char
const*)
/root/gdbtest/gcc/obj/../gcc/gcc/cp/cp-tree.h:5131
0x7f386f write_closure_template_head
/root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:1964
0x7f386f write_closure_type_name
/root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:1993
0x7f386f write_unqualified_name
/root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:1591
0xbc78df write_nested_name
/root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:1280
0xbc7e12 write_class_enum_type
/root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:3096
0xbc7e12 write_type
/root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:2515
0xbc715b write_template_args
/root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:3228
0xbc756f write_prefix
/root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:1342
0xbc756f write_prefix
/root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:1293
0xbc78d7 write_nested_name
/root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:1279
0xbc5276 write_encoding
/root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:938
0xbc541b write_mangled_name
/root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:820
0xbcb4e0 mangle_decl_string
/root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:4420
0xbcb6ca get_mangled_id
/root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:4441
0xbcb6ca mangle_decl(tree_node*)
/root/gdbtest/gcc/obj/../gcc/gcc/cp/mangle.cc:4479
0x16bc0fd decl_assembler_name(tree_node*)
/root/gdbtest/gcc/obj/../gcc/gcc/tree.cc:719
0x17354f1 notice_global_symbol(tree_node*)
/root/gdbtest/gcc/obj/../gcc/gcc/varasm.cc:1794
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
*******************************************************************************
Also ICE on trunk, compiler explorer:https://godbolt.org/z/es3P1he76
*******************************************************************************
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/115431] ICE: tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in decl_template_parm_check, at cp/cp-tree.h:5131
2024-06-11 9:57 [Bug c++/115431] New: ICE: tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in decl_template_parm_check, at cp/cp-tree.h:5131 iamanonymous.cs at gmail dot com
@ 2024-06-11 17:52 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-11 17:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115431
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Depends on| |115331
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Might be a dup of bug 115331.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115331
[Bug 115331] [13/14/15 Regression] ICE-on-invalid passing a typoed lambda to a
list-initializer
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-11 17:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-11 9:57 [Bug c++/115431] New: ICE: tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in decl_template_parm_check, at cp/cp-tree.h:5131 iamanonymous.cs at gmail dot com
2024-06-11 17:52 ` [Bug c++/115431] " 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).