summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/g++.dg/cpp0x
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-07 19:49:21 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-07 19:49:21 +0000
commitf591c59549befc0e18b3831bde6bb0018d9fc810 (patch)
treee52f83302281e2181dfe0b79267eea0346d943aa /gcc/testsuite/g++.dg/cpp0x
parent53c1d0bf6bea30d172fcaff62e00f814eefafc42 (diff)
downloadppe42-gcc-f591c59549befc0e18b3831bde6bb0018d9fc810.tar.gz
ppe42-gcc-f591c59549befc0e18b3831bde6bb0018d9fc810.zip
PR c++/61959
* semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@213733 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C28
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C
new file mode 100644
index 00000000000..f491994a1fe
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C
@@ -0,0 +1,28 @@
+// PR c++/61959
+// { dg-do compile { target c++11 } }
+
+template <class Coord> struct BasePoint
+{
+ Coord x, y;
+ constexpr BasePoint (Coord, Coord) : x (0), y (0) {}
+};
+template <class T> struct BaseCoord
+{
+ int value;
+ constexpr BaseCoord (T) : value (1) {}
+};
+template <class units> struct IntCoordTyped : BaseCoord<int>, units
+{
+ typedef BaseCoord Super;
+ constexpr IntCoordTyped (int) : Super (0) {}
+};
+template <class units>
+struct IntPointTyped : BasePoint<IntCoordTyped<units> >, units
+{
+ typedef BasePoint<IntCoordTyped<units> > Super;
+ constexpr IntPointTyped (int, int) : Super (0, 0) {}
+};
+struct A
+{
+};
+IntPointTyped<A> a (0, 0);
OpenPOWER on IntegriCloud