summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/constexpr-59686.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/constexpr-59686.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-59686.C9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-59686.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-59686.C
new file mode 100644
index 0000000000..8936214562
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-59686.C
@@ -0,0 +1,9 @@
+// PR c++/59686
+// { dg-do compile { target c++11 } }
+
+int main()
+{
+ static const int x = 5;
+ const int * const y = &x;
+ static_assert(y, ""); // { dg-error "non-constant|value" }
+}