summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/constexpr-ice7.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/constexpr-ice7.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ice7.C15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice7.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice7.C
new file mode 100644
index 0000000000..4fa3a83145
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice7.C
@@ -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;