re PR c++/57827 (compiler segmentation fault)
authorPaolo Carlini <paolo.carlini@oracle.com>
Wed, 10 Jul 2013 23:16:38 +0000 (23:16 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 10 Jul 2013 23:16:38 +0000 (23:16 +0000)
2013-07-10  Paolo Carlini  <paolo.carlini@oracle.com>

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

From-SVN: r200892

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

index 3d6b6805303d6c7c730aae657e475d00a0787034..d14d49cf154efcd07447735fbe4bdc9567a80f10 100644 (file)
@@ -1,3 +1,8 @@
+2013-07-10  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/57827
+       * g++.dg/cpp0x/constexpr-ice7.C: New.
+
 2013-07-10  Janis Johnson  <janisjo@codesourcery.com>
 
        * gcc.target/powerpc/20020118-1.c: Force 128-bit stack alignment
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice7.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice7.C
new file mode 100644 (file)
index 0000000..4fa3a83
--- /dev/null
@@ -0,0 +1,15 @@
+// PR c++/57827
+// { dg-do compile { target c++11 } }
+
+struct C
+{
+  constexpr int fun (int x)
+  {
+    return x + 1;
+  }
+
+  int a = 2;
+  int b = fun(a);
+};
+
+C c;