[Bug c++/88294] New: ICE on (invalid) C++11 code: in tsubst_copy, at cp/pt.c:15391
su at cs dot ucdavis.edu
gcc-bugzilla@gcc.gnu.org
Sat Dec 1 14:32:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88294
Bug ID: 88294
Summary: ICE on (invalid) C++11 code: in tsubst_copy, at
cp/pt.c:15391
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++tk tmp.cpp
tmp.cpp: In instantiation of ‘void A< <template-parameter-1-1> >::g() [with
<template-parameter-1-1> = int]’:
tmp.cpp:10:8: required from here
tmp.cpp:4:23: internal compiler error: in tsubst_copy, at cp/pt.c:15391
4 | void g () noexcept (f()) { }
| ^
0x85ab94 tsubst_copy
../../gcc-source-trunk/gcc/cp/pt.c:15391
0x846789 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../gcc-source-trunk/gcc/cp/pt.c:19225
0x848248 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../gcc-source-trunk/gcc/cp/pt.c:18180
0x8477d2 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../gcc-source-trunk/gcc/cp/pt.c:18158
0x846a73 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../gcc-source-trunk/gcc/cp/pt.c:19013
0x84944f tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../gcc-source-trunk/gcc/cp/pt.c:18630
0x893289 maybe_instantiate_noexcept(tree_node*, int)
../../gcc-source-trunk/gcc/cp/pt.c:24017
0x7696d1 mark_used(tree_node*, int)
../../gcc-source-trunk/gcc/cp/decl2.c:5338
0x6a1b8b build_over_call
../../gcc-source-trunk/gcc/cp/call.c:8456
0x6b145a build_new_method_call_1
../../gcc-source-trunk/gcc/cp/call.c:9677
0x6b145a build_new_method_call(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, tree_node*, int, tree_node**, int)
../../gcc-source-trunk/gcc/cp/call.c:9753
0x80bc37 cp_parser_postfix_expression
../../gcc-source-trunk/gcc/cp/parser.c:7274
0x7f196f cp_parser_unary_expression
../../gcc-source-trunk/gcc/cp/parser.c:8382
0x7ea9e2 cp_parser_cast_expression
../../gcc-source-trunk/gcc/cp/parser.c:9265
0x7eb0ff cp_parser_binary_expression
../../gcc-source-trunk/gcc/cp/parser.c:9366
0x7eba23 cp_parser_assignment_expression
../../gcc-source-trunk/gcc/cp/parser.c:9661
0x7ebcdc cp_parser_expression
../../gcc-source-trunk/gcc/cp/parser.c:9830
0x7f0235 cp_parser_expression_statement
../../gcc-source-trunk/gcc/cp/parser.c:11365
0x7fee21 cp_parser_statement
../../gcc-source-trunk/gcc/cp/parser.c:11161
0x80003f cp_parser_statement_seq_opt
../../gcc-source-trunk/gcc/cp/parser.c:11508
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.
$
---------------------------------------
template < typename > struct A
{
constexpr int f () { return 0; }
void g () noexcept (f()) { }
};
int main ()
{
A < int > a;
a.g ();
return 0;
}
More information about the Gcc-bugs
mailing list