re PR c++/64462 (ICE while compiling lambda using local constexpr reference variable)
authorPaolo Carlini <paolo.carlini@oracle.com>
Thu, 8 Jan 2015 17:48:38 +0000 (17:48 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 8 Jan 2015 17:48:38 +0000 (17:48 +0000)
2015-01-08  Paolo Carlini  <paolo.carlini@oracle.com>

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

From-SVN: r219352

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

index e692f4699d4cf0198cd5dcca1a5d86a31a6190ec..8ed09aed3f12081f4783f0757e6619d03badd8ac 100644 (file)
@@ -1,3 +1,8 @@
+2015-01-08  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/64462
+       * g++.dg/cpp0x/constexpr-64462.C: New.
+
 2015-01-08  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/60753
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-64462.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-64462.C
new file mode 100644 (file)
index 0000000..69193fd
--- /dev/null
@@ -0,0 +1,10 @@
+// PR c++/64462
+// { dg-do compile { target c++11 } }
+
+int x = 0;
+int z;
+
+int main() {
+  constexpr int& y = x;
+  [=] { z = y; }();
+}