]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
d: Add testcase from PR108962
authorIain Buclaw <ibuclaw@gdcproject.org>
Sun, 2 Jul 2023 13:44:49 +0000 (15:44 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Sun, 2 Jul 2023 13:53:55 +0000 (15:53 +0200)
The issue was fixed in r14-2232.

PR d/108962

gcc/testsuite/ChangeLog:

* gdc.dg/pr108962.d: New test.

gcc/testsuite/gdc.dg/pr108962.d [new file with mode: 0644]

diff --git a/gcc/testsuite/gdc.dg/pr108962.d b/gcc/testsuite/gdc.dg/pr108962.d
new file mode 100644 (file)
index 0000000..0fefa12
--- /dev/null
@@ -0,0 +1,13 @@
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108962
+// { dg-do compile }
+// { dg-options "-fno-exceptions -fdump-tree-original" }
+extern(C) void main()
+{
+    final switch (0)
+    {
+        case 1:
+            return;
+    }
+}
+// { dg-final { scan-tree-dump-times "_d_assert_msg" 1 "original" } }
+// { dg-final { scan-tree-dump-not "_d_throw" "original" } }