summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1y/pr77539.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp1y/pr77539.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr77539.C14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr77539.C b/gcc/testsuite/g++.dg/cpp1y/pr77539.C
new file mode 100644
index 00000000000..d1fba24c625
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr77539.C
@@ -0,0 +1,14 @@
+// PR c++/77539
+// { dg-do compile { target c++14 } }
+
+constexpr int foobar()
+{
+ int array[100] = {};
+ int *ar = array;
+ if (ar == nullptr) // Error...
+ {
+ return 0;
+ }
+ return 1;
+}
+static_assert(foobar(),"");