re PR c++/57764 (class static constexpr variables cannot be references)
authorPaolo Carlini <paolo.carlini@oracle.com>
Fri, 29 Aug 2014 12:47:19 +0000 (12:47 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 29 Aug 2014 12:47:19 +0000 (12:47 +0000)
2014-08-29  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/57764
* g++.dg/cpp0x/constexpr-57764.C: New.

From-SVN: r214728

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/constexpr-57764.C [new file with mode: 0644]

index b799e7921992c2fa8716bf6964099f60401fdfe6..0cf20a760c0d74f0a5827a13033fcc5ded8d305d 100644 (file)
@@ -1,3 +1,8 @@
+2014-08-29  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/57764
+       * g++.dg/cpp0x/constexpr-57764.C: New.
+
 2014-08-29  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/59938
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-57764.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-57764.C
new file mode 100644 (file)
index 0000000..b26f4b5
--- /dev/null
@@ -0,0 +1,11 @@
+// PR c++/57764
+// { dg-do compile { target c++11 } }
+
+constexpr int x = 42;
+  
+struct S
+{
+  static constexpr int const & y = x;
+};
+
+constexpr int const & S::y;