aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.dg/pr101657.d
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gdc.dg/pr101657.d')
-rw-r--r--gcc/testsuite/gdc.dg/pr101657.d14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gdc.dg/pr101657.d b/gcc/testsuite/gdc.dg/pr101657.d
new file mode 100644
index 0000000..0d77c36
--- /dev/null
+++ b/gcc/testsuite/gdc.dg/pr101657.d
@@ -0,0 +1,14 @@
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101657
+// { dg-do compile }
+// { dg-additional-options "-H" }
+
+void fun101657()
+{
+ fail; // { dg-error "undefined identifier 'fail'" }
+}
+
+// { dg-final { if ![file exists pr101657.di] \{ } }
+// { dg-final { pass "gdc.dg/pr101657.d (file exists pr101657.di)" } }
+// { dg-final { \} else \{ } }
+// { dg-final { fail "gdc.dg/pr101657.d (file exists pr101657.di)" } }
+// { dg-final { \} } }