Hi, Some error tests were forcing assembly output incorrectly, and none of them had an explanation for why they were using -ffat-lto-objects.
This patch removes dg-skip-if's for -fno-fat-lto-objects and adds -ffat-lto-objects to the test options instead. It also adds an explanation for the purpose of -ffat-lto-objects in each test. Tested with mips-mti-elf. Regards, Toma gcc/testsuite/ChangeLog: * gcc.target/mips/oddspreg-2.c (dg-options): Remove dg-skip-if for -fno-fat-lto-objects and add the -ffat-lto-objects option, along with an explanation for its purpose. * gcc.target/mips/oddspreg-3.c (dg-options): Likewise. * gcc.target/mips/oddspreg-6.c (dg-options): Likewise. * gcc.target/mips/no-dsp-1.c: Add an explanation for the purpose of -ffat-lto-objects. * gcc.target/mips/pr54240.c: Likewise. * gcc.target/mips/r10k-cache-barrier-14.c: Likewise. * gcc.target/mips/soft-float-1.c: Likewise. diff --git a/gcc/testsuite/gcc.target/mips/no-dsp-1.c b/gcc/testsuite/gcc.target/mips/no-dsp-1.c index c4a7b0a..f03f239 100644 --- a/gcc/testsuite/gcc.target/mips/no-dsp-1.c +++ b/gcc/testsuite/gcc.target/mips/no-dsp-1.c @@ -1,4 +1,7 @@ /* { dg-options "-mno-dsp -ffat-lto-objects" } */ +/* This is testing for errors which can only happen in assembly generation. + dg-error does not guarantee assembly generation, so we need to do it + manually by using -ffat-lto-objects. */ void foo (void) diff --git a/gcc/testsuite/gcc.target/mips/oddspreg-2.c b/gcc/testsuite/gcc.target/mips/oddspreg-2.c index efeb0af..1a85737 100644 --- a/gcc/testsuite/gcc.target/mips/oddspreg-2.c +++ b/gcc/testsuite/gcc.target/mips/oddspreg-2.c @@ -1,6 +1,8 @@ /* Check that we disable odd-numbered single precision registers. */ -/* { dg-skip-if "needs asm output" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */ -/* { dg-options "-mabi=32 -mno-odd-spreg -mhard-float" } */ +/* { dg-options "-mabi=32 -mno-odd-spreg -mhard-float -ffat-lto-objects" } */ +/* This is testing for errors which can only happen in assembly generation. + dg-error does not guarantee assembly generation, so we need to do it + manually by using -ffat-lto-objects. */ NOMIPS16 void foo () diff --git a/gcc/testsuite/gcc.target/mips/oddspreg-3.c b/gcc/testsuite/gcc.target/mips/oddspreg-3.c index 8a0d85c..16a2f03 100644 --- a/gcc/testsuite/gcc.target/mips/oddspreg-3.c +++ b/gcc/testsuite/gcc.target/mips/oddspreg-3.c @@ -1,6 +1,8 @@ /* Check that we disable odd-numbered single precision registers. */ -/* { dg-skip-if "needs asm output" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */ -/* { dg-options "-mabi=32 -mfp32 -march=loongson3a -mhard-float" } */ +/* { dg-options "-mabi=32 -mfp32 -march=loongson3a -mhard-float -ffat-lto-objects" } */ +/* This is testing for errors which can only happen in assembly generation. + dg-error does not guarantee assembly generation, so we need to do it + manually by using -ffat-lto-objects. */ NOMIPS16 void foo () diff --git a/gcc/testsuite/gcc.target/mips/oddspreg-6.c b/gcc/testsuite/gcc.target/mips/oddspreg-6.c index eb376c6..53ac076 100644 --- a/gcc/testsuite/gcc.target/mips/oddspreg-6.c +++ b/gcc/testsuite/gcc.target/mips/oddspreg-6.c @@ -1,6 +1,8 @@ /* Check that we disable odd-numbered single precision registers for FPXX. */ -/* { dg-skip-if "needs asm output" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */ -/* { dg-options "-mabi=32 -mfpxx -mhard-float" } */ +/* { dg-options "-mabi=32 -mfpxx -mhard-float -ffat-lto-objects" } */ +/* This is testing for errors which can only happen in assembly generation. + dg-error does not guarantee assembly generation, so we need to do it + manually by using -ffat-lto-objects. */ NOMIPS16 void foo () diff --git a/gcc/testsuite/gcc.target/mips/pr54240.c b/gcc/testsuite/gcc.target/mips/pr54240.c index 2d55b82..d3976f6 100644 --- a/gcc/testsuite/gcc.target/mips/pr54240.c +++ b/gcc/testsuite/gcc.target/mips/pr54240.c @@ -1,6 +1,9 @@ /* { dg-do compile } */ /* { dg-options "-fdump-tree-phiopt-details -ffat-lto-objects isa>=4" } */ /* { dg-skip-if "code quality test" { *-*-* } { "-O0" "-O1" } { "" } } */ +/* This is testing for errors which can only happen in assembly generation. + dg-error does not guarantee assembly generation, so we need to do it + manually by using -ffat-lto-objects. */ typedef struct s { int v; diff --git a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-14.c b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-14.c index 92c37f4..ecb4158 100644 --- a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-14.c +++ b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-14.c @@ -1,5 +1,8 @@ /* { dg-options "(-mips16) -mr10k-cache-barrier=store -ffat-lto-objects" } */ /* Test that indirect calls are protected. */ +/* This is testing for errors which can only happen in assembly generation. + dg-error does not guarantee assembly generation, so we need to do it + manually by using -ffat-lto-objects. */ MIPS16 void foo (void) { } /* { dg-message "sorry, unimplemented" } */ diff --git a/gcc/testsuite/gcc.target/mips/soft-float-1.c b/gcc/testsuite/gcc.target/mips/soft-float-1.c index 855ff8e..e6db3e2 100644 --- a/gcc/testsuite/gcc.target/mips/soft-float-1.c +++ b/gcc/testsuite/gcc.target/mips/soft-float-1.c @@ -1,4 +1,7 @@ /* { dg-options "-msoft-float -ffat-lto-objects" } */ +/* This is testing for errors which can only happen in assembly generation. + dg-error does not guarantee assembly generation, so we need to do it + manually by using -ffat-lto-objects. */ void foo (void)