This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/88293] New: ICE on C++11 code: in build_target_expr_with_type, at cp/tree.c:793
- From: "su at cs dot ucdavis.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 01 Dec 2018 13:33:13 +0000
- Subject: [Bug c++/88293] New: ICE on C++11 code: in build_target_expr_with_type, at cp/tree.c:793
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88293
Bug ID: 88293
Summary: ICE on C++11 code: in build_target_expr_with_type, at
cp/tree.c:793
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: su at cs dot ucdavis.edu
Target Milestone: ---
This appears to be a recent regression.
$ g++tk -v
Using built-in specs.
COLLECT_GCC=g++tk
COLLECT_LTO_WRAPPER=/home/su/software/tmp/gcc/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/9.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/home/su/software/tmp/gcc/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 9.0.0 20181201 (experimental) [trunk revision 266708] (GCC)
$
$ g++-8.1.0 -c tmp.cpp
$ clang++ -std=c++11 -c tmp.cpp
$
$ g++tk -c tmp.cpp
tmp.cpp:8:27: internal compiler error: in build_target_expr_with_type, at
cp/tree.c:793
8 | const int &f = (B(), B()).v;
| ^
0x8ea6c6 build_target_expr_with_type(tree_node*, tree_node*, int)
../../gcc-source-trunk/gcc/cp/tree.c:793
0x6f37b0 cxx_eval_outermost_constant_expr
../../gcc-source-trunk/gcc/cp/constexpr.c:5119
0x6f7679 maybe_constant_init_1
../../gcc-source-trunk/gcc/cp/constexpr.c:5382
0x6b8808 set_up_extended_ref_temp
../../gcc-source-trunk/gcc/cp/call.c:11189
0x6b8808 extend_ref_init_temps_1
../../gcc-source-trunk/gcc/cp/call.c:11349
0x9142d9 store_init_value(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
../../gcc-source-trunk/gcc/cp/typeck2.c:823
0x72b482 check_initializer
../../gcc-source-trunk/gcc/cp/decl.c:6486
0x754675 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
../../gcc-source-trunk/gcc/cp/decl.c:7162
0x8188cd cp_parser_init_declarator
../../gcc-source-trunk/gcc/cp/parser.c:20254
0x81929c cp_parser_simple_declaration
../../gcc-source-trunk/gcc/cp/parser.c:13398
0x822e04 cp_parser_declaration
../../gcc-source-trunk/gcc/cp/parser.c:13087
0x821b0e cp_parser_translation_unit
../../gcc-source-trunk/gcc/cp/parser.c:4674
0x821b0e c_parse_file()
../../gcc-source-trunk/gcc/cp/parser.c:40701
0x9798aa c_common_parse_file()
../../gcc-source-trunk/gcc/c-family/c-opts.c:1151
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.
$
--------------------------------
struct A { int v; };
struct B : A
{
constexpr B () : A () {}
};
const int &f = (B(), B()).v;