From: Iain Buclaw Date: Mon, 27 Feb 2023 17:38:53 +0000 (+0100) Subject: d: Add test for PR d/108167 to the testsuite [PR108167] X-Git-Tag: basepoints/gcc-14~776 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33a7811896a6c8e6fa71e385dbdf5013d833a116;p=thirdparty%2Fgcc.git d: Add test for PR d/108167 to the testsuite [PR108167] 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. --- diff --git a/gcc/testsuite/gdc.dg/pr108167.d b/gcc/testsuite/gdc.dg/pr108167.d new file mode 100644 index 000000000000..1337a494171f --- /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]; +}