re PR c++/59268 ([c++11] ICE with constexpr in a virtual function)
PR c++/59268 * pt.c (tsubst_copy_and_build): Handle POINTER_PLUS_EXPR. * g++.dg/cpp0x/constexpr-template6.C: New test. From-SVN: r205674
This commit is contained in:
parent
3bd7b086fd
commit
565839ae12
|
@ -1,3 +1,8 @@
|
|||
2013-12-04 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/59268
|
||||
* pt.c (tsubst_copy_and_build): Handle POINTER_PLUS_EXPR.
|
||||
|
||||
2013-11-29 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR sanitizer/59331
|
||||
|
|
|
@ -14159,6 +14159,10 @@ tsubst_copy_and_build (tree t,
|
|||
RETURN (r);
|
||||
}
|
||||
|
||||
case POINTER_PLUS_EXPR:
|
||||
return fold_build_pointer_plus (RECUR (TREE_OPERAND (t, 0)),
|
||||
RECUR (TREE_OPERAND (t, 1)));
|
||||
|
||||
case SCOPE_REF:
|
||||
RETURN (tsubst_qualified_id (t, args, complain, in_decl, /*done=*/true,
|
||||
/*address_p=*/false));
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2013-12-04 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/59268
|
||||
* g++.dg/cpp0x/constexpr-template6.C: New test.
|
||||
|
||||
2013-12-04 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gnat.dg/pack19.adb: New test.
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
// PR c++/59268
|
||||
// { dg-do compile }
|
||||
// { dg-options "-std=c++11" }
|
||||
|
||||
template <typename>
|
||||
struct A
|
||||
{
|
||||
constexpr A (int) {}
|
||||
virtual void foo ()
|
||||
{
|
||||
constexpr A<void> a (0);
|
||||
}
|
||||
};
|
||||
|
||||
void
|
||||
bar ()
|
||||
{
|
||||
A<int> a (3);
|
||||
a.foo ();
|
||||
}
|
Loading…
Reference in New Issue