Assorted testsuite fixes

First, gcc.dg/array-quals-1.c does not pass if the compiler is configured
with --enable-default-pie because the sections change, so force -fno-pie.
Second, replace *-*-solaris* with sparc*-*-* for gfortran.dg/pr95690.f90
because this depends on the architecture rather than the OS.  Third force
SRA to trigger on Aarch64 (like PowerPC) for gnat.dg/opt39.adb.

gcc/testsuite/
	* gcc.dg/array-quals-1.c: Pass -fno-pie if supported.
	* gcc.dg/loop-9.c: Likewise.
	* gfortran.dg/pr95690.f90: Replace *-*-solaris* with sparc*-*-*.
	* gnat.dg/opt39.adb: Pass --param option for Aarch64 too.
This commit is contained in:
Eric Botcazou 2021-03-09 16:20:53 +01:00
parent defafb78cb
commit 9f05c276ce
4 changed files with 5 additions and 3 deletions

View File

@ -4,6 +4,7 @@
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-do compile } */
/* { dg-options "-Wno-discarded-array-qualifiers" } */
/* { dg-additional-options "-fno-pie" { target pie } } */
/* The MMIX port always switches to the .data section at the end of a file. */
/* { dg-final { scan-assembler-not "\\.data(?!\\.rel\\.ro)" { xfail powerpc*-*-aix* mmix-*-* x86_64-*-mingw* } } } */
/* { dg-final { scan-assembler-symbol-section {^_?a$} {^\.(const|rodata|srodata)|\[RO\]} } } */

View File

@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O1 -fdump-rtl-loop2_invariant" } */
/* { dg-additional-options "-fno-pie" { target pie } } */
void
f (double *a)

View File

@ -2,8 +2,8 @@
module m
contains
subroutine s
print *, (erfc) ! { dg-error "not a floating constant" "" { target i?86-*-* x86_64-*-* *-*-solaris* cris-*-* } }
end ! { dg-error "not a floating constant" "" { target { ! "i?86-*-* x86_64-*-* *-*-solaris* cris-*-*" } } }
print *, (erfc) ! { dg-error "not a floating constant" "" { target i?86-*-* x86_64-*-* sparc*-*-* cris-*-* } }
end ! { dg-error "not a floating constant" "" { target { ! "i?86-*-* x86_64-*-* sparc*-*-* cris-*-*" } } }
function erfc()
end
end

View File

@ -1,6 +1,6 @@
-- { dg-do compile }
-- { dg-options "-O2 -fno-inline -fdump-tree-optimized" }
-- { dg-additional-options "-cargs --param=sra-max-scalarization-size-Ospeed=32 -margs" { target powerpc*-*-* } }
-- { dg-additional-options "-cargs --param=sra-max-scalarization-size-Ospeed=32 -margs" { target aarch64-*-* powerpc*-*-* } }
procedure Opt39 (I : Integer) is