[Bug c++/67139] [concepts] ICE on checking concepts with void with variable template

2015-08-06 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67139

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org

--- Comment #4 from Jason Merrill jason at gcc dot gnu.org ---
This seems to be fixed now.


[Bug c++/67139] [concepts] ICE on checking concepts with void with variable template

2015-08-06 Thread eric.niebler at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67139

Eric Niebler eric.niebler at gmail dot com changed:

   What|Removed |Added

Summary|[concepts] ICE on checking  |[concepts] ICE on checking
   |concepts with void  |concepts with void with
   ||variable template

--- Comment #3 from Eric Niebler eric.niebler at gmail dot com ---
The problem goes away when _vT is replaced with the equivalent T::type::value
in concept IsTrue_, so that seems to be the smoking gun.


[Bug c++/67139] [concepts] ICE on checking concepts with void

2015-08-06 Thread eric.niebler at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67139

--- Comment #2 from Eric Niebler eric.niebler at gmail dot com ---
Thanks, except that that is invalid code, and this bug is an ICE-on-valid.
Here's the equivalent valid repro case:

template class T
constexpr typename T::type::value_type _v = T::type::value;

template class T concept bool IsTrue_() { return _vT; }

template class T concept bool Unpossible() {
  return IsTrue_T ();
}

template class constexpr bool unpossible() { return false; }
Unpossible{ T }
constexpr bool unpossible() { return true; }

static_assert((!unpossiblevoid()), );


[Bug c++/67139] [concepts] ICE on checking concepts with void

2015-08-06 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67139

Markus Trippelsdorf trippels at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-08-06
 CC||trippels at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Markus Trippelsdorf trippels at gcc dot gnu.org ---
markus@x4 tmp % cat o.ii
template typename T typename T::typevalue_type _v;
template class T concept bool Constructible() { return _vT; }

template class T concept bool MoveConstructible() {
  return ConstructibleT ();
}

template class constexpr bool move_constructible() { return false; }
MoveConstructible { T }
constexpr bool move_constructible() { return true; }

static_assert((!move_constructiblevoid()), );


markus@x4 tmp % g++ -std=gnu++1z -c o.ii
o.ii:12:42: internal compiler error: Segmentation fault
 static_assert((!move_constructiblevoid()), );
  ^
0xc7f85f crash_signal
../../gcc/gcc/toplev.c:352
0x7fab31e0770f ???
/var/tmp/glibc/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0xef7bd0 strip_array_types(tree_node*)
../../gcc/gcc/tree.c:8194
0x71a2e8 cp_type_quals(tree_node const*)
../../gcc/gcc/cp/typeck.c:9006
0x790024 cv_unqualified(tree_node*)
../../gcc/gcc/cp/tree.c:1161
0x7fc8c4 satisfy_predicate_constraint
../../gcc/gcc/cp/constraint.cc:1705
0x7fc8c4 satisfy_constraint_1
../../gcc/gcc/cp/constraint.cc:1901
0x7fd5f6 satisfy_constraint
../../gcc/gcc/cp/constraint.cc:1952
0x7fd74c constraints_satisfied_p(tree_node*)
../../gcc/gcc/cp/constraint.cc:2059
0x5d832c add_function_candidate
../../gcc/gcc/cp/call.c:1986
0x5d8e88 add_template_candidate_real
../../gcc/gcc/cp/call.c:3109
0x5d957c add_template_candidate
../../gcc/gcc/cp/call.c:3151
0x5d957c add_candidates
../../gcc/gcc/cp/call.c:5307
0x5dbc03 perform_overload_resolution
../../gcc/gcc/cp/call.c:4003
0x5de10e build_new_function_call(tree_node*, vectree_node*, va_gc,
vl_embed**, bool, int)
../../gcc/gcc/cp/call.c:4080
0x76b998 finish_call_expr(tree_node*, vectree_node*, va_gc, vl_embed**, bool,
bool, int)
../../gcc/gcc/cp/semantics.c:2391
0x6e9737 cp_parser_postfix_expression
../../gcc/gcc/cp/parser.c:6421
0x6ee229 cp_parser_unary_expression
../../gcc/gcc/cp/parser.c:7485
0x6ee188 cp_parser_unary_expression
../../gcc/gcc/cp/parser.c:7438
0x6eee57 cp_parser_binary_expression
../../gcc/gcc/cp/parser.c:8222
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.