This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/59759] internal compiler error: in unify, using std::enable_if on classes
- From: "trippels at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 26 Sep 2014 15:02:36 +0000
- Subject: [Bug c++/59759] internal compiler error: in unify, using std::enable_if on classes
- Auto-submitted: auto-generated
- References: <bug-59759-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59759
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-09-26
CC| |trippels at gcc dot gnu.org
Target Milestone|--- |4.8.4
Ever confirmed|0 |1
Known to fail| |4.8.3, 4.9.1, 5.0
--- Comment #7 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
markus@x4 tmp % cat test3.ii
namespace std {
template <typename _Tp>
struct B {
static constexpr _Tp value = 0;
};
typedef B<int> false_type;
struct C : false_type {};
template <typename>
struct is_integral : C {};
template <int, typename _Tp>
struct enable_if {
typedef _Tp type;
};
}
enum class enabled;
constexpr enabled dummy{};
template <typename T, typename std::enable_if<std::is_integral<T>::value,
enabled>::type = dummy>
class A;
template <typename T>
void f(A<T>*) {
A<int>* map;
f(map);
}
markus@x4 tmp % g++ -c -std=c++11 test3.ii
test3.ii: In substitution of âtemplate<class T> void f(A<T>*) [with T =
<missing>]â:
test3.ii:23:8: required from here
test3.ii:23:8: internal compiler error: in unify, at cp/pt.c:18392
f(map);
^
0x606105 unify
../../gcc/gcc/cp/pt.c:18392
0x6067a4 unify
../../gcc/gcc/cp/pt.c:18234
0x51d9b8 try_class_unification
../../gcc/gcc/cp/pt.c:17248
0x605b77 unify
../../gcc/gcc/cp/pt.c:18271
0x605d5c unify
../../gcc/gcc/cp/pt.c:18138
0x6093f4 unify_one_argument
../../gcc/gcc/cp/pt.c:16657
0x60baea type_unification_real
../../gcc/gcc/cp/pt.c:16728
0x614aac 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:16164
0x5843e9 add_template_candidate_real
../../gcc/gcc/cp/call.c:3025
0x584e5c add_template_candidate
../../gcc/gcc/cp/call.c:3122
0x584e5c add_candidates
../../gcc/gcc/cp/call.c:5253
0x587413 perform_overload_resolution
../../gcc/gcc/cp/call.c:3971
0x5897da build_new_function_call(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, bool, int)
../../gcc/gcc/cp/call.c:4048
0x7032ac finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
../../gcc/gcc/cp/semantics.c:2366
0x688c55 cp_parser_postfix_expression
../../gcc/gcc/cp/parser.c:6232
0x68bb09 cp_parser_unary_expression
../../gcc/gcc/cp/parser.c:7293
0x68c744 cp_parser_binary_expression
../../gcc/gcc/cp/parser.c:8035
0x68ccd9 cp_parser_assignment_expression
../../gcc/gcc/cp/parser.c:8278
0x68f4c4 cp_parser_expression
../../gcc/gcc/cp/parser.c:8440
0x68fcfc cp_parser_expression_statement
../../gcc/gcc/cp/parser.c:9828
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.