aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.dg/pr101490.d
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gdc.dg/pr101490.d')
-rw-r--r--gcc/testsuite/gdc.dg/pr101490.d21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gdc.dg/pr101490.d b/gcc/testsuite/gdc.dg/pr101490.d
new file mode 100644
index 0000000..6929d40
--- /dev/null
+++ b/gcc/testsuite/gdc.dg/pr101490.d
@@ -0,0 +1,21 @@
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101490
+// { dg-do compile }
+
+struct S101490
+{
+ int[0] arr;
+}
+
+void main()
+{
+ S101490* t;
+ auto a = cast(typeof(t.arr)[0])t.arr;
+ write(a);
+}
+
+void write(S)(S args)
+{
+ foreach (arg; args)
+ {
+ }
+}