]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
d: Add test for PR d/108167 to the testsuite [PR108167]
authorIain Buclaw <ibuclaw@gdcproject.org>
Mon, 27 Feb 2023 17:38:53 +0000 (18:38 +0100)
committerIain Buclaw <ibuclaw@gdcproject.org>
Fri, 3 Mar 2023 00:24:28 +0000 (01:24 +0100)
The D front-end implementation got fixed in upstream, add test to the
gdc testsuite to check we don't regress on it.

PR d/108167

gcc/testsuite/ChangeLog:

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

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

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