2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Jul 2013 23:16:38 +0000 (23:16 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Jul 2013 23:16:38 +0000 (23:16 +0000)
PR c++/57827
* g++.dg/cpp0x/constexpr-ice7.C: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200892 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 3d6b680..d14d49c 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;