aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2002-01-16 16:21:51 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2002-01-16 16:21:51 +0100
commitc4031a047e530947f9888faec85c645c4c1ac065 (patch)
tree4ebc9b9b8e194f04f7f2310981ad0b23368c2640
parent44b8152b881c0d4e8583ecfffdc41d7a3b1d7a0b (diff)
downloadgcc-c4031a047e530947f9888faec85c645c4c1ac065.zip
gcc-c4031a047e530947f9888faec85c645c4c1ac065.tar.gz
gcc-c4031a047e530947f9888faec85c645c4c1ac065.tar.bz2
re PR target/5357 (SPARC: illegal (?) combination of -mcpu=supersparc and -m64 causes ICE)
PR target/5357: * config/sparc/sparc.c (sparc_override_options): Avoid MASK_V9 and MASK_V8 being both set. * gcc.dg/20020116-2.c: New test. From-SVN: r48909
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/sparc/sparc.c5
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/20020116-2.c18
4 files changed, 32 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5c262ab..64d7ce4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2002-01-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/5357:
+ * config/sparc/sparc.c (sparc_override_options): Avoid MASK_V9 and
+ MASK_V8 being both set.
+
2002-01-16 Ulrich Weigand <uweigand@de.ibm.com>
* config/s390/s390.c (s390_emit_prologue): Do not emit USE
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 8914a8b..3e3d1a8 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -401,7 +401,10 @@ sparc_override_options ()
are available.
-m64 also implies v9. */
if (TARGET_VIS || TARGET_ARCH64)
- target_flags |= MASK_V9;
+ {
+ target_flags |= MASK_V9;
+ target_flags &= ~(MASK_V8 | MASK_SPARCLET | MASK_SPARCLITE);
+ }
/* Use the deprecated v8 insns for sparc64 in 32 bit mode. */
if (TARGET_V9 && TARGET_ARCH32)
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index fc714f8..28eeb14b 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2002-01-16 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/20020116-2.c: New test.
+
2002-01-15 Geoffrey Keating <geoffk@redhat.com>
* gcc.dg/20020103-1.c: Also test for __PPC__, since that's used
diff --git a/gcc/testsuite/gcc.dg/20020116-2.c b/gcc/testsuite/gcc.dg/20020116-2.c
new file mode 100644
index 0000000..04f5c6e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/20020116-2.c
@@ -0,0 +1,18 @@
+/* This testcase ICEd on sparc64 because -mcpu=supersparc and implicit
+ -m64 resulted in MASK_V8 and MASK_V9 to be set at the same time. */
+/* { dg-do compile } */
+/* { dg-options "" } */
+/* { dg-options "-mcpu=supersparc" { target sparc*-*-* } } */
+
+void bar (long *x, long *y);
+
+void foo (int x, long *y, long *z)
+{
+ int i;
+
+ for (i = x - 1; i >= 0; i--)
+ {
+ bar (z + i * 3 + 1, y);
+ bar (z + i * 3 + 2, y);
+ }
+}