[Bug c++/91678] [9 Regression] decltype returns wrong type under certain conditions
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Mar 4 21:34:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91678
--- Comment #10 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
With this patch GCC 9 ICEs on:
$ ./cc1plus -quiet pr87768.C -std=gnu++2a -fconcepts
pr87768.C: In instantiation of ‘constexpr const bool c<unsigned int []>::f’:
pr87768.C:14:29: required from here
pr87768.C:9:29: internal compiler error: in tsubst_copy, at cp/pt.c:15833
9 | requires requires(d e) { e[0]; }
| ~^
0xaaad12 tsubst_copy
/home/mpolacek/src/gcc9/gcc/cp/pt.c:15833
0xac0b50 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
/home/mpolacek/src/gcc9/gcc/cp/pt.c:19709
0xaba51d tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
/home/mpolacek/src/gcc9/gcc/cp/pt.c:18434
0xab8707 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
/home/mpolacek/src/gcc9/gcc/cp/pt.c:17969
0x8c892b satisfy_expression_constraint
/home/mpolacek/src/gcc9/gcc/cp/constraint.cc:2070
0x8c92ff satisfy_constraint_1
/home/mpolacek/src/gcc9/gcc/cp/constraint.cc:2242
0x8c90c9 satisfy_parameterized_constraint
/home/mpolacek/src/gcc9/gcc/cp/constraint.cc:2185
0x8c9388 satisfy_constraint_1
/home/mpolacek/src/gcc9/gcc/cp/constraint.cc:2257
0x8c944d satisfy_constraint
/home/mpolacek/src/gcc9/gcc/cp/constraint.cc:2294
0x8c9511 satisfy_associated_constraints
/home/mpolacek/src/gcc9/gcc/cp/constraint.cc:2318
0x8c97ed constraints_satisfied_p(tree_node*)
/home/mpolacek/src/gcc9/gcc/cp/constraint.cc:2393
0x8454e3 add_function_candidate
/home/mpolacek/src/gcc9/gcc/cp/call.c:2222
0x851d96 add_candidates
/home/mpolacek/src/gcc9/gcc/cp/call.c:5754
0x84d828 build_op_call_1
/home/mpolacek/src/gcc9/gcc/cp/call.c:4712
0x84e172 build_op_call(tree_node*, vec<tree_node*, va_gc, vl_embed>**, int)
/home/mpolacek/src/gcc9/gcc/cp/call.c:4808
0xb0e895 finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
/home/mpolacek/src/gcc9/gcc/cp/semantics.c:2602
0xabdd43 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
/home/mpolacek/src/gcc9/gcc/cp/pt.c:19195
0xab8707 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
/home/mpolacek/src/gcc9/gcc/cp/pt.c:17969
0xaa9801 tsubst_init
/home/mpolacek/src/gcc9/gcc/cp/pt.c:15527
0xad2f31 regenerate_decl_from_template
/home/mpolacek/src/gcc9/gcc/cp/pt.c:24262
because tsubst_copy/NON_LVALUE_EXPR gets
NON_LVALUE_EXPR <VIEW_CONVERT_EXPR<unsigned int *>(e)>
Don't know if I should pursue this backport.
More information about the Gcc-bugs
mailing list