aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/d/dmd/MERGE2
-rw-r--r--gcc/d/dmd/mtype.c3
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19890a.d7
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail19890b.d7
4 files changed, 16 insertions, 3 deletions
diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE
index 36f9aa9..3e3e718 100644
--- a/gcc/d/dmd/MERGE
+++ b/gcc/d/dmd/MERGE
@@ -1,4 +1,4 @@
-b0cd591770fefb4db6eaba89b7a548ef1e980f5c
+c6887d9bbbe7b68e03ba3bccbf61432c1b369386
The first line of this file holds the git revision number of the last
merge done from the dlang/dmd repository.
diff --git a/gcc/d/dmd/mtype.c b/gcc/d/dmd/mtype.c
index 1757b49..2b1c5a1 100644
--- a/gcc/d/dmd/mtype.c
+++ b/gcc/d/dmd/mtype.c
@@ -4134,8 +4134,7 @@ Type *TypeSArray::semantic(Loc loc, Scope *sc)
* when the bottom of element type is opaque.
*/
}
- else if (tbn->isintegral() ||
- tbn->isfloating() ||
+ else if (tbn->isTypeBasic() ||
tbn->ty == Tpointer ||
tbn->ty == Tarray ||
tbn->ty == Tsarray ||
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19890a.d b/gcc/testsuite/gdc.test/fail_compilation/fail19890a.d
new file mode 100644
index 0000000..57c4caf
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19890a.d
@@ -0,0 +1,7 @@
+// PERMUTE_ARGS:
+/*
+---
+fail_compilation/fail19890a.d(8): Error: `void[/^[0-9]+(LU)?$/]` size 1 * /^[0-9]+$/ exceeds 0x7fffffff size limit for static array
+---
+*/
+void[] f = cast(void[-1]) "a";
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail19890b.d b/gcc/testsuite/gdc.test/fail_compilation/fail19890b.d
new file mode 100644
index 0000000..a9b1874
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail19890b.d
@@ -0,0 +1,7 @@
+// PERMUTE_ARGS:
+/*
+---
+fail_compilation/fail19890b.d(8): Error: `void[/^[0-9]+(LU)?$/]` size 1 * /^[0-9]+$/ exceeds 0x7fffffff size limit for static array
+---
+*/
+void[] f = cast(void[-2]) "a";