aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@orcam.me.uk>2024-12-25 22:23:39 +0000
committerMaciej W. Rozycki <macro@orcam.me.uk>2024-12-25 22:23:39 +0000
commit46cb538cc0ad58936748538166562e8e2a31487e (patch)
tree93798734847a0721c3cb6a0b7bd59c49cad427ef /gcc
parent44e61bd7124c762e81d8c6e615fbe7c88f773637 (diff)
downloadgcc-46cb538cc0ad58936748538166562e8e2a31487e.zip
gcc-46cb538cc0ad58936748538166562e8e2a31487e.tar.gz
gcc-46cb538cc0ad58936748538166562e8e2a31487e.tar.bz2
Alpha/testsuite: Run target testing over all the usual optimization levels
Use `gcc-dg-runtest' test driver rather than `dg-runtest' to run the Alpha testsuite as several targets already do. Add `-Og -g' and `-Oz' as well via ADDITIONAL_TORTURE_OPTIONS to expand coverage. Adjust test options across individual test cases accordingly where required. Discard base-2.c, cix-2.c, and max-2.c test cases as they merely are optimization variants of base-1.c, cix-1.c, and max-1.c respectively, run at `-O2' rather than the default level (`-O0'), now covered by the framework with the latter ones in a generic way. Old test results: === gcc Summary === # of expected passes 44 vs new ones: === gcc Summary === # of expected passes 364 # of unsupported tests 5 gcc/testsuite/ * gcc.target/alpha/alpha.exp: Use `gcc-dg-runtest' rather than `dg-runtest'. Add `-Og -g' and `-Oz' variants via ADDITIONAL_TORTURE_OPTIONS. * gcc.target/alpha/20000715-1.c: Adjust test options accordingly. * gcc.target/alpha/20011018-1.c: Likewise. * gcc.target/alpha/980217-1.c: Likewise. * gcc.target/alpha/asm-1.c: Likewise. * gcc.target/alpha/pr105209.c: Likewise. * gcc.target/alpha/pr106966.c: Likewise. * gcc.target/alpha/pr115297.c: Likewise. * gcc.target/alpha/pr115526.c: Likewise. * gcc.target/alpha/pr19518.c: Likewise. * gcc.target/alpha/pr22093.c: Likewise. * gcc.target/alpha/pr24178.c: Likewise. * gcc.target/alpha/pr39740.c: Likewise. * gcc.target/alpha/pr42113.c: Likewise. * gcc.target/alpha/pr42269-1.c: Likewise. * gcc.target/alpha/pr42448-1.c: Likewise. * gcc.target/alpha/pr42448-2.c: Likewise. * gcc.target/alpha/pr42774.c: Likewise. * gcc.target/alpha/pr61586.c: Likewise. * gcc.target/alpha/pr66140.c: Likewise. * gcc.target/alpha/pr83628-1.c: Likewise. * gcc.target/alpha/pr83628-2.c: Likewise. * gcc.target/alpha/pr83628-3.c: Likewise. * gcc.target/alpha/pr86984.c: Likewise. * gcc.target/alpha/sqrt.c: Likewise. * gcc.target/alpha/base-2.c: Remove file. * gcc.target/alpha/cix-2.c: Remove file. * gcc.target/alpha/max-2.c: Remove file.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gcc.target/alpha/20000715-1.c2
-rw-r--r--gcc/testsuite/gcc.target/alpha/20011018-1.c2
-rw-r--r--gcc/testsuite/gcc.target/alpha/980217-1.c2
-rw-r--r--gcc/testsuite/gcc.target/alpha/alpha.exp4
-rw-r--r--gcc/testsuite/gcc.target/alpha/asm-1.c2
-rw-r--r--gcc/testsuite/gcc.target/alpha/base-2.c5
-rw-r--r--gcc/testsuite/gcc.target/alpha/cix-2.c5
-rw-r--r--gcc/testsuite/gcc.target/alpha/max-2.c5
-rw-r--r--gcc/testsuite/gcc.target/alpha/pr105209.c2
-rw-r--r--gcc/testsuite/gcc.target/alpha/pr106966.c2
-rw-r--r--gcc/testsuite/gcc.target/alpha/pr115297.c2
-rw-r--r--gcc/testsuite/gcc.target/alpha/pr115526.c2
-rw-r--r--gcc/testsuite/gcc.target/alpha/pr19518.c2
-rw-r--r--gcc/testsuite/gcc.target/alpha/pr22093.c2
-rw-r--r--gcc/testsuite/gcc.target/alpha/pr24178.c3
-rw-r--r--gcc/testsuite/gcc.target/alpha/pr39740.c2
-rw-r--r--gcc/testsuite/gcc.target/alpha/pr42113.c2
-rw-r--r--gcc/testsuite/gcc.target/alpha/pr42269-1.c3
-rw-r--r--gcc/testsuite/gcc.target/alpha/pr42448-1.c2
-rw-r--r--gcc/testsuite/gcc.target/alpha/pr42448-2.c2
-rw-r--r--gcc/testsuite/gcc.target/alpha/pr42774.c2
-rw-r--r--gcc/testsuite/gcc.target/alpha/pr61586.c2
-rw-r--r--gcc/testsuite/gcc.target/alpha/pr66140.c2
-rw-r--r--gcc/testsuite/gcc.target/alpha/pr83628-1.c3
-rw-r--r--gcc/testsuite/gcc.target/alpha/pr83628-2.c3
-rw-r--r--gcc/testsuite/gcc.target/alpha/pr83628-3.c3
-rw-r--r--gcc/testsuite/gcc.target/alpha/pr86984.c2
-rw-r--r--gcc/testsuite/gcc.target/alpha/sqrt.c2
28 files changed, 32 insertions, 40 deletions
diff --git a/gcc/testsuite/gcc.target/alpha/20000715-1.c b/gcc/testsuite/gcc.target/alpha/20000715-1.c
index 3ff15604..8b81022 100644
--- a/gcc/testsuite/gcc.target/alpha/20000715-1.c
+++ b/gcc/testsuite/gcc.target/alpha/20000715-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mieee" } */
+/* { dg-options "-mieee" } */
float foo(unsigned char n)
{
diff --git a/gcc/testsuite/gcc.target/alpha/20011018-1.c b/gcc/testsuite/gcc.target/alpha/20011018-1.c
index e01fcf5..a68054c 100644
--- a/gcc/testsuite/gcc.target/alpha/20011018-1.c
+++ b/gcc/testsuite/gcc.target/alpha/20011018-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mieee" } */
+/* { dg-options "-mieee" } */
double foo (void);
void bar (float, float);
diff --git a/gcc/testsuite/gcc.target/alpha/980217-1.c b/gcc/testsuite/gcc.target/alpha/980217-1.c
index 06ef4e8..e3d5360 100644
--- a/gcc/testsuite/gcc.target/alpha/980217-1.c
+++ b/gcc/testsuite/gcc.target/alpha/980217-1.c
@@ -1,7 +1,7 @@
/* Test float on alpha. */
/* { dg-do run } */
-/* { dg-options "-mieee -O2" } */
+/* { dg-options "-mieee" } */
extern void abort(void);
extern int printf(const char *, ...);
diff --git a/gcc/testsuite/gcc.target/alpha/alpha.exp b/gcc/testsuite/gcc.target/alpha/alpha.exp
index 17c26f0..993b1b3 100644
--- a/gcc/testsuite/gcc.target/alpha/alpha.exp
+++ b/gcc/testsuite/gcc.target/alpha/alpha.exp
@@ -21,6 +21,8 @@ if ![istarget alpha*-*-*] then {
return
}
+lappend ADDITIONAL_TORTURE_OPTIONS {-Og -g} {-Oz}
+
# Load support procs.
load_lib gcc-dg.exp
@@ -34,7 +36,7 @@ if ![info exists DEFAULT_CFLAGS] then {
dg-init
# Main loop.
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
"" $DEFAULT_CFLAGS
# All done.
diff --git a/gcc/testsuite/gcc.target/alpha/asm-1.c b/gcc/testsuite/gcc.target/alpha/asm-1.c
index 4bb5ecb..b96bb99 100644
--- a/gcc/testsuite/gcc.target/alpha/asm-1.c
+++ b/gcc/testsuite/gcc.target/alpha/asm-1.c
@@ -2,7 +2,7 @@
hard register all the way through compilation. Example derived
from glibc source. */
/* { dg-do compile } */
-/* { dg-options "-O2 -frename-registers -fcprop-registers" } */
+/* { dg-options "-frename-registers -fcprop-registers" } */
/* { dg-final { scan-assembler "callsys1 .0 .19 .0 .16 .17" } } */
/* { dg-final { scan-assembler "callsys2 .0 .19 .0 .16 .17" } } */
diff --git a/gcc/testsuite/gcc.target/alpha/base-2.c b/gcc/testsuite/gcc.target/alpha/base-2.c
deleted file mode 100644
index 830dbc7..0000000
--- a/gcc/testsuite/gcc.target/alpha/base-2.c
+++ /dev/null
@@ -1,5 +0,0 @@
-/* Test that alpha-base-1.c compiles with optimization. */
-/* { dg-do link } */
-/* { dg-options "-mcpu=ev4 -O2" } */
-
-#include "base-1.c"
diff --git a/gcc/testsuite/gcc.target/alpha/cix-2.c b/gcc/testsuite/gcc.target/alpha/cix-2.c
deleted file mode 100644
index c34c3c6..0000000
--- a/gcc/testsuite/gcc.target/alpha/cix-2.c
+++ /dev/null
@@ -1,5 +0,0 @@
-/* Test that alpha-cix-1.c compiles with optimization. */
-/* { dg-do link } */
-/* { dg-options "-mcpu=ev67 -O2" } */
-
-#include "cix-1.c"
diff --git a/gcc/testsuite/gcc.target/alpha/max-2.c b/gcc/testsuite/gcc.target/alpha/max-2.c
deleted file mode 100644
index c5491ea..0000000
--- a/gcc/testsuite/gcc.target/alpha/max-2.c
+++ /dev/null
@@ -1,5 +0,0 @@
-/* Test that alpha-max-1.c compiles with optimization. */
-/* { dg-do link } */
-/* { dg-options "-mcpu=pca56 -O2" } */
-
-#include "max-1.c"
diff --git a/gcc/testsuite/gcc.target/alpha/pr105209.c b/gcc/testsuite/gcc.target/alpha/pr105209.c
index b89be96..ab7aa1e 100644
--- a/gcc/testsuite/gcc.target/alpha/pr105209.c
+++ b/gcc/testsuite/gcc.target/alpha/pr105209.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -ftrapv -mcpu=ev4" } */
+/* { dg-options "-ftrapv -mcpu=ev4" } */
typedef struct tnode_t {
struct tnode_t *tn_left, *tn_right;
diff --git a/gcc/testsuite/gcc.target/alpha/pr106966.c b/gcc/testsuite/gcc.target/alpha/pr106966.c
index 7145c20..408c34a 100644
--- a/gcc/testsuite/gcc.target/alpha/pr106966.c
+++ b/gcc/testsuite/gcc.target/alpha/pr106966.c
@@ -1,6 +1,6 @@
/* PR target/106906 */
/* { dg-do compile } */
-/* { dg-options "-O2 -mbuild-constants" } */
+/* { dg-options "-mbuild-constants" } */
void
do_console (unsigned short *vga)
diff --git a/gcc/testsuite/gcc.target/alpha/pr115297.c b/gcc/testsuite/gcc.target/alpha/pr115297.c
index 4d5890e..0729a6a 100644
--- a/gcc/testsuite/gcc.target/alpha/pr115297.c
+++ b/gcc/testsuite/gcc.target/alpha/pr115297.c
@@ -1,6 +1,6 @@
/* PR target/115297 */
/* { dg-do compile } */
-/* { dg-options "-O1" } */
+/* { dg-options "" } */
enum { BPF_F_USER_BUILD_ID } __bpf_get_stack_size;
long __bpf_get_stack_flags, bpf_get_stack___trans_tmp_2;
diff --git a/gcc/testsuite/gcc.target/alpha/pr115526.c b/gcc/testsuite/gcc.target/alpha/pr115526.c
index 2f57903..6b0918d 100644
--- a/gcc/testsuite/gcc.target/alpha/pr115526.c
+++ b/gcc/testsuite/gcc.target/alpha/pr115526.c
@@ -1,6 +1,6 @@
/* PR target/115526 */
/* { dg-do assemble } */
-/* { dg-options "-O2 -Wno-attributes -fvisibility=hidden -fPIC -mcpu=ev4" } */
+/* { dg-options "-Wno-attributes -fvisibility=hidden -fPIC -mcpu=ev4" } */
struct _ts {
struct _dtoa_state *interp;
diff --git a/gcc/testsuite/gcc.target/alpha/pr19518.c b/gcc/testsuite/gcc.target/alpha/pr19518.c
index 42dd549..74e5189 100644
--- a/gcc/testsuite/gcc.target/alpha/pr19518.c
+++ b/gcc/testsuite/gcc.target/alpha/pr19518.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mcpu=ev67" } */
+/* { dg-options "-mcpu=ev67" } */
typedef short INT16;
typedef unsigned int CARD32;
diff --git a/gcc/testsuite/gcc.target/alpha/pr22093.c b/gcc/testsuite/gcc.target/alpha/pr22093.c
index aa00e15..f27a190 100644
--- a/gcc/testsuite/gcc.target/alpha/pr22093.c
+++ b/gcc/testsuite/gcc.target/alpha/pr22093.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "" } */
struct shared_ptr_struct
{
diff --git a/gcc/testsuite/gcc.target/alpha/pr24178.c b/gcc/testsuite/gcc.target/alpha/pr24178.c
index 0a31aa7..a59df7d 100644
--- a/gcc/testsuite/gcc.target/alpha/pr24178.c
+++ b/gcc/testsuite/gcc.target/alpha/pr24178.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mcpu=ev4" } */
+/* { dg-options "-mcpu=ev4" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
struct S {
long l;
diff --git a/gcc/testsuite/gcc.target/alpha/pr39740.c b/gcc/testsuite/gcc.target/alpha/pr39740.c
index 230beb7..67c7366 100644
--- a/gcc/testsuite/gcc.target/alpha/pr39740.c
+++ b/gcc/testsuite/gcc.target/alpha/pr39740.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -std=c99 -mexplicit-relocs" } */
+/* { dg-options "-std=c99 -mexplicit-relocs" } */
typedef int R_len_t;
typedef unsigned int SEXPTYPE;
diff --git a/gcc/testsuite/gcc.target/alpha/pr42113.c b/gcc/testsuite/gcc.target/alpha/pr42113.c
index 228c14a..a6fac22 100644
--- a/gcc/testsuite/gcc.target/alpha/pr42113.c
+++ b/gcc/testsuite/gcc.target/alpha/pr42113.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "" } */
int foo (int a, int b)
{
diff --git a/gcc/testsuite/gcc.target/alpha/pr42269-1.c b/gcc/testsuite/gcc.target/alpha/pr42269-1.c
index 5d4ef1c..a3c43ad 100644
--- a/gcc/testsuite/gcc.target/alpha/pr42269-1.c
+++ b/gcc/testsuite/gcc.target/alpha/pr42269-1.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
/* { dg-final { scan-assembler-not "addl" } } */
unsigned
diff --git a/gcc/testsuite/gcc.target/alpha/pr42448-1.c b/gcc/testsuite/gcc.target/alpha/pr42448-1.c
index 4e2c376..e4497e8 100644
--- a/gcc/testsuite/gcc.target/alpha/pr42448-1.c
+++ b/gcc/testsuite/gcc.target/alpha/pr42448-1.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mcpu=21064 -O0" } */
+/* { dg-options "-mcpu=21064" } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.target/alpha/pr42448-2.c b/gcc/testsuite/gcc.target/alpha/pr42448-2.c
index aeebad2..6a2f686 100644
--- a/gcc/testsuite/gcc.target/alpha/pr42448-2.c
+++ b/gcc/testsuite/gcc.target/alpha/pr42448-2.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mcpu=21064 -O0" } */
+/* { dg-options "-mcpu=21064" } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.target/alpha/pr42774.c b/gcc/testsuite/gcc.target/alpha/pr42774.c
index 6568800..1d77f4a 100644
--- a/gcc/testsuite/gcc.target/alpha/pr42774.c
+++ b/gcc/testsuite/gcc.target/alpha/pr42774.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mcpu=ev4" } */
+/* { dg-options "-mcpu=ev4" } */
unsigned int ntfs_getinfo(void *p)
{
diff --git a/gcc/testsuite/gcc.target/alpha/pr61586.c b/gcc/testsuite/gcc.target/alpha/pr61586.c
index afb1af3..b8133d8 100644
--- a/gcc/testsuite/gcc.target/alpha/pr61586.c
+++ b/gcc/testsuite/gcc.target/alpha/pr61586.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mieee" } */
+/* { dg-options "-mieee" } */
void foo (int *dimensions, double **params, int hh)
{
diff --git a/gcc/testsuite/gcc.target/alpha/pr66140.c b/gcc/testsuite/gcc.target/alpha/pr66140.c
index a69f022..b1cad25 100644
--- a/gcc/testsuite/gcc.target/alpha/pr66140.c
+++ b/gcc/testsuite/gcc.target/alpha/pr66140.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mcpu=ev4" } */
+/* { dg-options "-mcpu=ev4" } */
struct scsi_cmnd {
int sc_data_direction;
diff --git a/gcc/testsuite/gcc.target/alpha/pr83628-1.c b/gcc/testsuite/gcc.target/alpha/pr83628-1.c
index a4a32d9..9c9eac5 100644
--- a/gcc/testsuite/gcc.target/alpha/pr83628-1.c
+++ b/gcc/testsuite/gcc.target/alpha/pr83628-1.c
@@ -1,6 +1,7 @@
/* PR target/83628 */
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/testsuite/gcc.target/alpha/pr83628-2.c b/gcc/testsuite/gcc.target/alpha/pr83628-2.c
index 2f02181..04ca7a7 100644
--- a/gcc/testsuite/gcc.target/alpha/pr83628-2.c
+++ b/gcc/testsuite/gcc.target/alpha/pr83628-2.c
@@ -1,6 +1,7 @@
/* PR target/83628 */
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
int
s4l (int a, int b)
diff --git a/gcc/testsuite/gcc.target/alpha/pr83628-3.c b/gcc/testsuite/gcc.target/alpha/pr83628-3.c
index 5bec89f..55faf0b 100644
--- a/gcc/testsuite/gcc.target/alpha/pr83628-3.c
+++ b/gcc/testsuite/gcc.target/alpha/pr83628-3.c
@@ -1,6 +1,7 @@
/* PR target/83628 */
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
int
s4l (int a, int b)
diff --git a/gcc/testsuite/gcc.target/alpha/pr86984.c b/gcc/testsuite/gcc.target/alpha/pr86984.c
index f6a98d4..84ff0d9 100644
--- a/gcc/testsuite/gcc.target/alpha/pr86984.c
+++ b/gcc/testsuite/gcc.target/alpha/pr86984.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -Wall -Wwrite-strings -Werror -fmerge-all-constants -fno-stack-protector -mieee -fdump-rtl-expand" } */
+/* { dg-options "-Wall -Wwrite-strings -Werror -fmerge-all-constants -fno-stack-protector -mieee -fdump-rtl-expand" } */
struct expression {
unsigned long int num;
diff --git a/gcc/testsuite/gcc.target/alpha/sqrt.c b/gcc/testsuite/gcc.target/alpha/sqrt.c
index a3c8b24..3617ba4 100644
--- a/gcc/testsuite/gcc.target/alpha/sqrt.c
+++ b/gcc/testsuite/gcc.target/alpha/sqrt.c
@@ -2,7 +2,7 @@
When using software completions, we have to prevent assembler to match
input and output operands of sqrtt/sqrtf insn. Fixed in glibc 2.26. */
/* { dg-do run } */
-/* { dg-options "-O2 -fno-builtin-sqrt -mieee" } */
+/* { dg-options "-fno-builtin-sqrt -mieee" } */
double sqrt (double);