https://gcc.gnu.org/g:46cb538cc0ad58936748538166562e8e2a31487e

commit r15-6433-g46cb538cc0ad58936748538166562e8e2a31487e
Author: Maciej W. Rozycki <ma...@orcam.me.uk>
Date:   Wed Dec 25 22:23:39 2024 +0000

    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.

Diff:
---
 gcc/testsuite/gcc.target/alpha/20000715-1.c | 2 +-
 gcc/testsuite/gcc.target/alpha/20011018-1.c | 2 +-
 gcc/testsuite/gcc.target/alpha/980217-1.c   | 2 +-
 gcc/testsuite/gcc.target/alpha/alpha.exp    | 4 +++-
 gcc/testsuite/gcc.target/alpha/asm-1.c      | 2 +-
 gcc/testsuite/gcc.target/alpha/base-2.c     | 5 -----
 gcc/testsuite/gcc.target/alpha/cix-2.c      | 5 -----
 gcc/testsuite/gcc.target/alpha/max-2.c      | 5 -----
 gcc/testsuite/gcc.target/alpha/pr105209.c   | 2 +-
 gcc/testsuite/gcc.target/alpha/pr106966.c   | 2 +-
 gcc/testsuite/gcc.target/alpha/pr115297.c   | 2 +-
 gcc/testsuite/gcc.target/alpha/pr115526.c   | 2 +-
 gcc/testsuite/gcc.target/alpha/pr19518.c    | 2 +-
 gcc/testsuite/gcc.target/alpha/pr22093.c    | 2 +-
 gcc/testsuite/gcc.target/alpha/pr24178.c    | 3 ++-
 gcc/testsuite/gcc.target/alpha/pr39740.c    | 2 +-
 gcc/testsuite/gcc.target/alpha/pr42113.c    | 2 +-
 gcc/testsuite/gcc.target/alpha/pr42269-1.c  | 3 ++-
 gcc/testsuite/gcc.target/alpha/pr42448-1.c  | 2 +-
 gcc/testsuite/gcc.target/alpha/pr42448-2.c  | 2 +-
 gcc/testsuite/gcc.target/alpha/pr42774.c    | 2 +-
 gcc/testsuite/gcc.target/alpha/pr61586.c    | 2 +-
 gcc/testsuite/gcc.target/alpha/pr66140.c    | 2 +-
 gcc/testsuite/gcc.target/alpha/pr83628-1.c  | 3 ++-
 gcc/testsuite/gcc.target/alpha/pr83628-2.c  | 3 ++-
 gcc/testsuite/gcc.target/alpha/pr83628-3.c  | 3 ++-
 gcc/testsuite/gcc.target/alpha/pr86984.c    | 2 +-
 gcc/testsuite/gcc.target/alpha/sqrt.c       | 2 +-
 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 3ff15604eb96..8b81022a315f 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 e01fcf5c4ad9..a68054c5c9e0 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 06ef4e808289..e3d53601379d 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 17c26f009a1c..993b1b3684ce 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 4bb5ecbb73cf..b96bb99002d0 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 830dbc7b0383..000000000000
--- 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 c34c3c68b464..000000000000
--- 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 c5491eaba96e..000000000000
--- 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 b89be96dc1d0..ab7aa1eaea71 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 7145c2096c68..408c34a818af 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 4d5890ec8d90..0729a6a19e4e 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 2f57903fec34..6b0918dd5cd5 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 42dd5492437b..74e5189080f3 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 aa00e15506ad..f27a190afa66 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 0a31aa7366ad..a59df7dbe85f 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 230beb7db5d2..67c7366128e5 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 228c14abb64c..a6fac22a22d9 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 5d4ef1c258fc..a3c43add7f75 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 4e2c376e39dc..e4497e86b88f 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 aeebad2809b4..6a2f6860f776 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 65688002b3a9..1d77f4a0ff84 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 afb1af3597fe..b8133d8f702e 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 a69f0222521f..b1cad254f79c 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 a4a32d989693..9c9eac53fb27 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 2f02181d28b2..04ca7a7645c7 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 5bec89f8047d..55faf0b677be 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 f6a98d4ed9c0..84ff0d9a8b3e 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 a3c8b243ae41..3617ba4240c5 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);

Reply via email to