diff mbox series

[committed] d: Add testcase from PR108962

Message ID 20230702135601.3632320-1-ibuclaw@gdcproject.org
State New
Headers show
Series [committed] d: Add testcase from PR108962 | expand

Commit Message

Iain Buclaw July 2, 2023, 1:56 p.m. UTC
Hi,

This adds testcase from PR108962 into the gdc testsuite.

The issue was fixed in r14-2232 and backported to gcc-13.

Regtested, committed to mainline and gcc-13 branches.

Regards,
Iain.

---
	PR d/108962

gcc/testsuite/ChangeLog:

	* gdc.dg/pr108962.d: New test.
---
 gcc/testsuite/gdc.dg/pr108962.d | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 gcc/testsuite/gdc.dg/pr108962.d
diff mbox series

Patch

diff --git a/gcc/testsuite/gdc.dg/pr108962.d b/gcc/testsuite/gdc.dg/pr108962.d
new file mode 100644
index 00000000000..0fefa126b54
--- /dev/null
+++ b/gcc/testsuite/gdc.dg/pr108962.d
@@ -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" } }