diff mbox series

[committed] d: Add test for PR d/108167 to the testsuite [PR108167]

Message ID 20230303001351.4145614-1-ibuclaw@gdcproject.org
State New
Headers show
Series [committed] d: Add test for PR d/108167 to the testsuite [PR108167] | expand

Commit Message

Iain Buclaw March 3, 2023, 12:13 a.m. UTC
Hi,

This patch adds the test for checking PR108167.  The D front-end
implementation got fixed in upstream, add test to the gdc testsuite to
check we don't regress on it.

Regression tested on x86_64-linux-gnu/-m32, and committed to mainline.

Regards,
Iain.

---
	PR d/108167

gcc/testsuite/ChangeLog:

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

Patch

diff --git a/gcc/testsuite/gdc.dg/pr108167.d b/gcc/testsuite/gdc.dg/pr108167.d
new file mode 100644
index 00000000000..1337a494171
--- /dev/null
+++ b/gcc/testsuite/gdc.dg/pr108167.d
@@ -0,0 +1,5 @@ 
+// { dg-do compile }
+auto pr108167(const(ubyte[32])[] a)
+{
+    return cast(const(ubyte)*)&a[1][0];
+}