aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2014-09-03 15:56:31 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-09-03 15:56:31 +0000
commit4254ad78d813b8c4cfc6c07218aee6b1be554f23 (patch)
tree8e9350d7e0339c5c7da9499ab5742527e21520c6 /gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C
parent9bba04175106d9b9e8a58715e3e7fa560c13e092 (diff)
parente97c99f15937e5762a973b25192aab824126a6d3 (diff)
downloadtoolchain_gcc-4254ad78d813b8c4cfc6c07218aee6b1be554f23.tar.gz
toolchain_gcc-4254ad78d813b8c4cfc6c07218aee6b1be554f23.tar.bz2
toolchain_gcc-4254ad78d813b8c4cfc6c07218aee6b1be554f23.zip
Merge "[gcc-4.9] Merge svn r214745 from google/gcc-4_9 branch. Merge gcc-4_9 source r214745 from google/gcc-4_9 branch."
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C28
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C
new file mode 100644
index 000000000..f491994a1
--- /dev/null
+++ b/gcc-4.9/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);