re PR c++/51530 ([C++0x] internal compiler error: in unify, at cp/pt.c:16854)
PR c++/51530 * pt.c (unify): Handle NULLPTR_TYPE. From-SVN: r182505
This commit is contained in:
parent
7a61392921
commit
4f7002c581
|
@ -1,5 +1,8 @@
|
||||||
2011-12-19 Jason Merrill <jason@redhat.com>
|
2011-12-19 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
PR c++/51530
|
||||||
|
* pt.c (unify): Handle NULLPTR_TYPE.
|
||||||
|
|
||||||
PR c++/51526
|
PR c++/51526
|
||||||
* semantics.c (build_data_member_initialization): Handle
|
* semantics.c (build_data_member_initialization): Handle
|
||||||
delegating constructor.
|
delegating constructor.
|
||||||
|
|
|
@ -16614,6 +16614,7 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict,
|
||||||
case BOOLEAN_TYPE:
|
case BOOLEAN_TYPE:
|
||||||
case ENUMERAL_TYPE:
|
case ENUMERAL_TYPE:
|
||||||
case VOID_TYPE:
|
case VOID_TYPE:
|
||||||
|
case NULLPTR_TYPE:
|
||||||
if (TREE_CODE (arg) != TREE_CODE (parm))
|
if (TREE_CODE (arg) != TREE_CODE (parm))
|
||||||
return unify_type_mismatch (explain_p, parm, arg);
|
return unify_type_mismatch (explain_p, parm, arg);
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2011-12-19 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
PR c++/51530
|
||||||
|
* g++.dg/cpp0x/nullptr26.C: New.
|
||||||
|
|
||||||
2011-12-19 Richard Sandiford <rdsandiford@googlemail.com>
|
2011-12-19 Richard Sandiford <rdsandiford@googlemail.com>
|
||||||
|
|
||||||
* gcc.target/mips/mult-1.c: Require -O2.
|
* gcc.target/mips/mult-1.c: Require -O2.
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
// PR c++/51530
|
||||||
|
// { dg-options -std=c++0x }
|
||||||
|
|
||||||
|
template <class T, class U>
|
||||||
|
void f(T, U);
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
void f(T, decltype(nullptr));
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
f(1, nullptr);
|
||||||
|
}
|
Loading…
Reference in New Issue