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
This commit is contained in:
Jakub Jelinek 2002-01-16 16:21:51 +01:00 committed by Jakub Jelinek
parent 44b8152b88
commit c4031a047e
4 changed files with 32 additions and 1 deletions

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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);
}
}