re PR c++/57654 ([c++11] static class member reference-to-a-reference will not compile)
authorPaolo Carlini <paolo.carlini@oracle.com>
Wed, 19 Nov 2014 09:36:40 +0000 (09:36 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 19 Nov 2014 09:36:40 +0000 (09:36 +0000)
2014-11-19  Paolo Carlini  <paolo.carlini@oracle.com>

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

From-SVN: r217756

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

index 19b6c01b78fbd47f5258dc014213e62f11249e79..c42d725b3e87f47d7d38be5829e2e39d4f1ebe25 100644 (file)
@@ -1,3 +1,8 @@
+2014-11-19  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/57654
+       * g++.dg/cpp0x/constexpr-ref7.C: New.
+
 2014-11-19  Jakub Jelinek  <jakub@redhat.com>
 
        PR sanitizer/63913
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ref7.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ref7.C
new file mode 100644 (file)
index 0000000..72c8d08
--- /dev/null
@@ -0,0 +1,11 @@
+// PR c++/57654
+// { dg-do compile { target c++11 } }
+
+int i;
+
+constexpr int & iref = i;
+constexpr int & irefref = iref;
+
+class A {
+  static constexpr int & irefref = iref;
+};