]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Alpha/testsuite: Run target testing over all the usual optimization levels
authorMaciej W. Rozycki <macro@orcam.me.uk>
Wed, 25 Dec 2024 22:23:39 +0000 (22:23 +0000)
committerMaciej W. Rozycki <macro@orcam.me.uk>
Wed, 25 Dec 2024 22:23:39 +0000 (22:23 +0000)
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.

28 files changed:
gcc/testsuite/gcc.target/alpha/20000715-1.c
gcc/testsuite/gcc.target/alpha/20011018-1.c
gcc/testsuite/gcc.target/alpha/980217-1.c
gcc/testsuite/gcc.target/alpha/alpha.exp
gcc/testsuite/gcc.target/alpha/asm-1.c
gcc/testsuite/gcc.target/alpha/base-2.c [deleted file]
gcc/testsuite/gcc.target/alpha/cix-2.c [deleted file]
gcc/testsuite/gcc.target/alpha/max-2.c [deleted file]
gcc/testsuite/gcc.target/alpha/pr105209.c
gcc/testsuite/gcc.target/alpha/pr106966.c
gcc/testsuite/gcc.target/alpha/pr115297.c
gcc/testsuite/gcc.target/alpha/pr115526.c
gcc/testsuite/gcc.target/alpha/pr19518.c
gcc/testsuite/gcc.target/alpha/pr22093.c
gcc/testsuite/gcc.target/alpha/pr24178.c
gcc/testsuite/gcc.target/alpha/pr39740.c
gcc/testsuite/gcc.target/alpha/pr42113.c
gcc/testsuite/gcc.target/alpha/pr42269-1.c
gcc/testsuite/gcc.target/alpha/pr42448-1.c
gcc/testsuite/gcc.target/alpha/pr42448-2.c
gcc/testsuite/gcc.target/alpha/pr42774.c
gcc/testsuite/gcc.target/alpha/pr61586.c
gcc/testsuite/gcc.target/alpha/pr66140.c
gcc/testsuite/gcc.target/alpha/pr83628-1.c
gcc/testsuite/gcc.target/alpha/pr83628-2.c
gcc/testsuite/gcc.target/alpha/pr83628-3.c
gcc/testsuite/gcc.target/alpha/pr86984.c
gcc/testsuite/gcc.target/alpha/sqrt.c

index 3ff15604eb96800cb0f6907220e521e2b3b59ebc..8b81022a315f96fbc33b488f0a66d65ddc7abd9d 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -mieee" } */
+/* { dg-options "-mieee" } */
 
 float foo(unsigned char n)
 {
index e01fcf5c4ad92a11438d3a8bbf41fd327a1a5a4d..a68054c5c9e00487c1bd050d27aac709d38bd942 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -mieee" } */
+/* { dg-options "-mieee" } */
 
 double foo (void);
 void bar (float, float);
index 06ef4e808289c3a5318d501dcff6f7749300fa12..e3d53601379dab5f6c43f290e3dc97cd8c3b7798 100644 (file)
@@ -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 *, ...);
index 17c26f009a1c933d12411d3824c8d09c95a0ed95..993b1b3684ce13e982487e003f62a3fae9a0df0f 100644 (file)
@@ -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.
index 4bb5ecbb73cff466dda49947fc5b15a35b34eb5f..b96bb99002d07830df8a57375a1684927ed1628c 100644 (file)
@@ -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 (file)
index 830dbc7..0000000
+++ /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 (file)
index c34c3c6..0000000
+++ /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 (file)
index c5491ea..0000000
+++ /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"
index b89be96dc1d0cab731c0110c3fda109b990e8316..ab7aa1eaea719a912c6aaee96f8391cf54c5476a 100644 (file)
@@ -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;
index 7145c2096c68c3904bc9727785e1b3ce29347bcd..408c34a818af027000d0efd84ca3a30495ce090e 100644 (file)
@@ -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)
index 4d5890ec8d900de9f27eb09e9a75fa634b9d41d2..0729a6a19e4eb82334ab427b515f8726bb7a71d6 100644 (file)
@@ -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;
index 2f57903fec34a4941ce497ecf0be4ab3cf5a8754..6b0918dd5cd590f9f084f0d82c1d4826e5cee59e 100644 (file)
@@ -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;
index 42dd5492437b845d37185786dea01ac6734bfc95..74e5189080f322be36019e61ca43951537eb3375 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -mcpu=ev67" } */
+/* { dg-options "-mcpu=ev67" } */
 
 typedef short INT16;
 typedef unsigned int CARD32;
index aa00e15506ad4be6db6fe0144cbfd2c381d1d226..f27a190afa66fb1b20016ffbe652f3872cfb7c69 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "" } */
 
 struct shared_ptr_struct
 {
index 0a31aa7366ad2a86563747bedcb1a4c7b50a88e4..a59df7dbe85f60b377a02da77deab1e666d6eef8 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -mcpu=ev4" } */
+/* { dg-options "-mcpu=ev4" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
 
 struct S {
     long l;
index 230beb7db5d26730ae8e49e3d15738698322ca31..67c7366128e51b8ea602fd87cbe3dd7ae9124a20 100644 (file)
@@ -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;
index 228c14abb64c4719895541a0c8d9398695033bcd..a6fac22a22d9c95a7d569ed0ebd713640ba58bb4 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "" } */
 
 int foo (int a, int b)
 {
index 5d4ef1c258fc29d4979280c400ef2e9a86a2bc1a..a3c43add7f75fe68b9666a7ec52b1cbd0b43628f 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
 /* { dg-final { scan-assembler-not "addl" } } */
 
 unsigned
index 4e2c376e39dc782130702346520451175a8c44d3..e4497e86b88f543914f157c082f8ed4153672f59 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do run } */
-/* { dg-options "-mcpu=21064 -O0" } */
+/* { dg-options "-mcpu=21064" } */
 
 extern void abort (void);
 
index aeebad2809b4507e0d2696197be0e7611c65264d..6a2f6860f776eb461d622b372c5facadb1f031d6 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do run } */
-/* { dg-options "-mcpu=21064 -O0" } */
+/* { dg-options "-mcpu=21064" } */
 
 extern void abort (void);
 
index 65688002b3a973dca4cf4fb6ba66ef1d9cf0228d..1d77f4a0ff847f4f022f394c04b68b3ec9205e41 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -mcpu=ev4" } */
+/* { dg-options "-mcpu=ev4" } */
 
 unsigned int ntfs_getinfo(void *p)
 {
index afb1af3597fe7df096b9b2f3cc954e77d47f4e99..b8133d8f702eb9ba6fa4b288dc543d2c0396567f 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -mieee" } */
+/* { dg-options "-mieee" } */
 
 void foo (int *dimensions, double **params, int hh)
 {
index a69f0222521f3b36c37fcd0839b092e093d7c237..b1cad254f79ca9e9f9698e311f41408726bfc92e 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -mcpu=ev4" } */
+/* { dg-options "-mcpu=ev4" } */
 
 struct scsi_cmnd {
        int sc_data_direction;
index a4a32d989693af2eeaed36a1e80f98aee224490d..9c9eac53fb274fd5e89e689bcba09c9f2706619b 100644 (file)
@@ -1,6 +1,7 @@
 /* PR target/83628 */
 /* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } } */
 
 typedef __SIZE_TYPE__ size_t;
 
index 2f02181d28b21df3b24aa4cb955b70d10854767d..04ca7a7645c7bb6042a097d30f9af56ec73b0c1e 100644 (file)
@@ -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)
index 5bec89f8047d90b5fd83f72d398409e9636b48db..55faf0b677be0e06feb4de3f1c5f8d5c7d6e700e 100644 (file)
@@ -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)
index f6a98d4ed9c0e01250c8402b8e1007b70491080a..84ff0d9a8b3e744897f55304503c40699b667f9e 100644 (file)
@@ -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;
index a3c8b243ae41625f2130614fc1f529090388caa7..3617ba4240c59eb59d7d15cb3d1a0b881866f2b3 100644 (file)
@@ -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);