aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2019-06-16 07:48:53 +0000
committerIain Buclaw <ibuclaw@gcc.gnu.org>2019-06-16 07:48:53 +0000
commita1543fb19ba17a455b0e9df5e373a1643082f5d2 (patch)
treec8157e15adef387be9ecc8d925829a547fbcb813 /gcc/testsuite
parent70106db92654b83cd0ea62a078805e84ef2d8ee8 (diff)
downloadgcc-a1543fb19ba17a455b0e9df5e373a1643082f5d2.zip
gcc-a1543fb19ba17a455b0e9df5e373a1643082f5d2.tar.gz
gcc-a1543fb19ba17a455b0e9df5e373a1643082f5d2.tar.bz2
re PR d/90650 (ICE in fold_convert_loc, at fold-const.c:2552)
PR d/90650 d/dmd: Merge upstream dmd ab03e2918 Fixes internal compiler error in fold_convert_loc. Reviewed-on: https://github.com/dlang/dmd/pull/9996 gcc/testsuite/ChangeLog: 2019-06-16 Iain Buclaw <ibuclaw@gdcproject.org> PR d/90650 * gdc.dg/pr90650a.d: New test. * gdc.dg/pr90650b.d: New test. From-SVN: r272344
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gdc.dg/pr90650a.d14
-rw-r--r--gcc/testsuite/gdc.dg/pr90650b.d13
3 files changed, 33 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 3a1a1e7..db21750 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2019-06-15 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/90650
+ * gdc.dg/pr90650a.d: New test.
+ * gdc.dg/pr90650b.d: New test.
+
2019-06-15 Steven G. Kargl <kargl@gcc.gnu.org>
* gfortran.dg/dummy_derived_typed.f90: New test.
diff --git a/gcc/testsuite/gdc.dg/pr90650a.d b/gcc/testsuite/gdc.dg/pr90650a.d
new file mode 100644
index 0000000..57228ca
--- /dev/null
+++ b/gcc/testsuite/gdc.dg/pr90650a.d
@@ -0,0 +1,14 @@
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90650
+// { dg-do compile }
+class c
+{
+ static f ()
+ {
+ return 0;
+ }
+}
+
+void g ()
+{
+ if (0 & [0] & c.f()) {} // { dg-error "array operation \\\[0\\\] & 0 & f\\(\\) without destination memory not allowed" }
+}
diff --git a/gcc/testsuite/gdc.dg/pr90650b.d b/gcc/testsuite/gdc.dg/pr90650b.d
new file mode 100644
index 0000000..2b3192e
--- /dev/null
+++ b/gcc/testsuite/gdc.dg/pr90650b.d
@@ -0,0 +1,13 @@
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90650
+// { dg-do compile }
+class c
+{
+ static f ()
+ {
+ return 0;
+ }
+}
+void g ()
+{
+ if ([0] & c.f()) {} // { dg-error "array operation \\\[0\\\] & f\\(\\) without destination memory not allowed" }
+}