This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/67654] New: [concepts] ICE when using concepts in constexpr function
- From: "ryan.burn at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 20 Sep 2015 16:57:08 +0000
- Subject: [Bug c++/67654] New: [concepts] ICE when using concepts in constexpr function
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67654
Bug ID: 67654
Summary: [concepts] ICE when using concepts in constexpr
function
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ryan.burn at gmail dot com
Target Milestone: ---
Created attachment 36353
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36353&action=edit
reproduces problem
My version of gcc:
g++ (GCC) 6.0.0 20150915 (experimental)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The attached code causes this internal compiler error:
main.cpp: In instantiation of âstruct A<int, double>â:
main.cpp:24:18: required from here
main.cpp:20:33: error: no matching function for call to âand_c()â
A() requires and_c<C<Tx>()...>() = default;
^
main.cpp:10:42: note: candidate: template<bool ...Values> constexpr bool
and_c()
template <bool... Values> constexpr bool and_c() {
^
main.cpp:10:42: note: template argument deduction/substitution failed:
main.cpp:20:33: internal compiler error: unexpected expression âC<int>â of kind
template_id_expr
A() requires and_c<C<Tx>()...>() = default;
^
0x816bc0 cxx_eval_constant_expression
../../gcc/gcc/cp/constexpr.c:3685
0x812e25 cxx_eval_call_expression
../../gcc/gcc/cp/constexpr.c:1186
0x81575f cxx_eval_constant_expression
../../gcc/gcc/cp/constexpr.c:3205
0x81a53b cxx_eval_outermost_constant_expr
../../gcc/gcc/cp/constexpr.c:3739
0x6846c6 convert_nontype_argument
../../gcc/gcc/cp/pt.c:6314
0x6846c6 convert_template_argument
../../gcc/gcc/cp/pt.c:7190
0x65a514 coerce_template_parameter_pack
../../gcc/gcc/cp/pt.c:7336
0x65a514 coerce_template_parms
../../gcc/gcc/cp/pt.c:7559
0x691bb3 fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node*
const*, unsigned int, tree_node*, unification_kind_t, int, bool, bool)
../../gcc/gcc/cp/pt.c:16871
0x5fa73b print_z_candidate
../../gcc/gcc/cp/call.c:3424
0x5fc33e print_z_candidates
../../gcc/gcc/cp/call.c:3494
0x605c17 build_new_function_call(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, bool, int)
../../gcc/gcc/cp/call.c:4104
0x78ff5e finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
../../gcc/gcc/cp/semantics.c:2391
0x68131f tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../gcc/gcc/cp/pt.c:15872
0x66aad1 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
../../gcc/gcc/cp/pt.c:15044
0x822ed6 tsubst_predicate_constraint(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/constraint.cc:1416
0x824fbf tsubst_constraint_info(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/constraint.cc:1638
0x6739d0 tsubst_decl
../../gcc/gcc/cp/pt.c:11501
0x6624c6 tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:12426
0x697a26 instantiate_class_template_1
../../gcc/gcc/cp/pt.c:9919
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.