diff options
Diffstat (limited to 'gcc/testsuite/gdc.test/compilable/test17146.d')
-rw-r--r-- | gcc/testsuite/gdc.test/compilable/test17146.d | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gdc.test/compilable/test17146.d b/gcc/testsuite/gdc.test/compilable/test17146.d new file mode 100644 index 00000000000..098bfe4c5d0 --- /dev/null +++ b/gcc/testsuite/gdc.test/compilable/test17146.d @@ -0,0 +1,13 @@ +// REQUIRED_ARGS: -O -inline
+
+// https://issues.dlang.org/show_bug.cgi?id=17146
+
+struct S { int[] a; int b; }
+
+void foo()
+{
+ S[] s;
+ if (s[$-1] == S.init) {}
+}
+
+void bar() { foo(); }
|