From fecd62edad9f9649e2e7f52d5520cd10a4c52d8a Mon Sep 17 00:00:00 2001 From: Sam James Date: Thu, 18 Jul 2024 08:27:29 +0100 Subject: testsuite: Add dg-do run to even more tests All of these are for wrong-code bugs. Confirmed to be used before but with no execution. Tested on x86_64-pc-linux-gnu and checked test logs before/after. 2024-07-26 Sam James PR target/7559 PR c++/9704 PR c++/16115 PR c++/19317 PR rtl-optimization/11536 PR target/20322 PR tree-optimization/31966 PR rtl-optimization/41033 PR tree-optimization/67947 * g++.dg/cpp1z/byte1.C: Add dg-do run directive. * g++.dg/init/call1.C: Ditto. * g++.dg/init/copy5.C: Ditto. * g++.dg/opt/nrv9.C: Ditto. * gcc.dg/20021006-1.c: Ditto. * gcc.dg/20030721-1.c: Ditto. * gcc.dg/20050307-1.c: Ditto. * gcc.dg/pr41033.c: Ditto. * gcc.dg/torture/pr67947.c: Ditto. * gcc.dg/tree-ssa/pr31966.c: Ditto. * gcc.dg/tree-ssa/tailcall-3.c: Ditto. * gcc.dg/tree-ssa/vrp74.c: Ditto. * gcc.target/nvptx/abort.c: Fix whitespace in dg directive. --- gcc/testsuite/g++.dg/cpp1z/byte1.C | 2 +- gcc/testsuite/g++.dg/init/call1.C | 1 + gcc/testsuite/g++.dg/init/copy5.C | 1 + gcc/testsuite/g++.dg/opt/nrv9.C | 1 + gcc/testsuite/gcc.dg/20021006-1.c | 1 + gcc/testsuite/gcc.dg/20030721-1.c | 3 ++- gcc/testsuite/gcc.dg/20050307-1.c | 1 + gcc/testsuite/gcc.dg/pr41033.c | 3 ++- gcc/testsuite/gcc.dg/torture/pr67947.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/pr31966.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/tailcall-3.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/vrp74.c | 1 + gcc/testsuite/gcc.target/nvptx/abort.c | 2 +- 13 files changed, 15 insertions(+), 5 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/g++.dg/cpp1z/byte1.C b/gcc/testsuite/g++.dg/cpp1z/byte1.C index 631b18d..e4e3b6e 100644 --- a/gcc/testsuite/g++.dg/cpp1z/byte1.C +++ b/gcc/testsuite/g++.dg/cpp1z/byte1.C @@ -1,5 +1,5 @@ // Test for std::byte aliasing properties. -// { dg-do compile { target c++17 } } +// { dg-do run { target c++17 } } // { dg-options "-O3" } #include diff --git a/gcc/testsuite/g++.dg/init/call1.C b/gcc/testsuite/g++.dg/init/call1.C index d44b6dd..548d59c 100644 --- a/gcc/testsuite/g++.dg/init/call1.C +++ b/gcc/testsuite/g++.dg/init/call1.C @@ -1,4 +1,5 @@ // Bug c++/16115 +// { dg-do run } // { dg-options "-O2" } extern "C" void abort(); diff --git a/gcc/testsuite/g++.dg/init/copy5.C b/gcc/testsuite/g++.dg/init/copy5.C index cef5a29..26e3bf8 100644 --- a/gcc/testsuite/g++.dg/init/copy5.C +++ b/gcc/testsuite/g++.dg/init/copy5.C @@ -1,3 +1,4 @@ +// { dg-do run } // { dg-options "-O2" } struct BOOL { diff --git a/gcc/testsuite/g++.dg/opt/nrv9.C b/gcc/testsuite/g++.dg/opt/nrv9.C index 4625068..08bcde8 100644 --- a/gcc/testsuite/g++.dg/opt/nrv9.C +++ b/gcc/testsuite/g++.dg/opt/nrv9.C @@ -1,4 +1,5 @@ // PR c++/19317 +// { dg-do run } // If we do both NRV and caller-side return slot opt for ga = f() // constructing la sets ga.i to 0 too soon. diff --git a/gcc/testsuite/gcc.dg/20021006-1.c b/gcc/testsuite/gcc.dg/20021006-1.c index 92df2c5..7904b9f 100644 --- a/gcc/testsuite/gcc.dg/20021006-1.c +++ b/gcc/testsuite/gcc.dg/20021006-1.c @@ -1,6 +1,7 @@ /* PR target/7559 This testcase was miscompiled on x86-64 due to wrong access to the struct members. */ +/* { dg-do run } */ extern void abort(void); diff --git a/gcc/testsuite/gcc.dg/20030721-1.c b/gcc/testsuite/gcc.dg/20030721-1.c index 5e8ed0b..52be42f 100644 --- a/gcc/testsuite/gcc.dg/20030721-1.c +++ b/gcc/testsuite/gcc.dg/20030721-1.c @@ -1,5 +1,6 @@ -/* { dg-options "-O2" } */ /* PR optimization/11536 */ +/* { dg-do run } */ +/* { dg-options "-O2" } */ /* Origin: samal@kam.mff.cuni.cz */ /* Testcase by Andrew Pinski */ diff --git a/gcc/testsuite/gcc.dg/20050307-1.c b/gcc/testsuite/gcc.dg/20050307-1.c index 0e8dac6..b370a57 100644 --- a/gcc/testsuite/gcc.dg/20050307-1.c +++ b/gcc/testsuite/gcc.dg/20050307-1.c @@ -1,4 +1,5 @@ /* PR target/20322 */ +/* { dg-do run } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/pr41033.c b/gcc/testsuite/gcc.dg/pr41033.c index 5043be2..4c1863c 100644 --- a/gcc/testsuite/gcc.dg/pr41033.c +++ b/gcc/testsuite/gcc.dg/pr41033.c @@ -1,5 +1,6 @@ -/* { dg-options "-O1 -fno-strict-aliasing" } */ /* PR rtl-optimization/41033 */ +/* { dg-do run } */ +/* { dg-options "-O1 -fno-strict-aliasing" } */ struct X { int i; diff --git a/gcc/testsuite/gcc.dg/torture/pr67947.c b/gcc/testsuite/gcc.dg/torture/pr67947.c index 5664c48..368a8b2 100644 --- a/gcc/testsuite/gcc.dg/torture/pr67947.c +++ b/gcc/testsuite/gcc.dg/torture/pr67947.c @@ -1,3 +1,4 @@ +/* { dg-do run } */ /* { dg-additional-options "-O3" } */ #include diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr31966.c b/gcc/testsuite/gcc.dg/tree-ssa/pr31966.c index a18f9d0..5cbf112 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr31966.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr31966.c @@ -1,5 +1,6 @@ /* Contributed by Jack Lloyd */ +/* { dg-do run } */ /* { dg-options "-O2 -ftree-vectorize" } */ /* { dg-options "-O2 -ftree-vectorize -march=nocona" { target { i?86-*-* x86_64-*-* } } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/tailcall-3.c b/gcc/testsuite/gcc.dg/tree-ssa/tailcall-3.c index 4055bc3..865362d 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/tailcall-3.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/tailcall-3.c @@ -2,7 +2,7 @@ (e.g. s390) needs additional code. So it is invalid to do tail call optimization here. */ -/* { dg-do compile } */ +/* { dg-do run } */ /* { dg-options "-O2" } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp74.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp74.c index b15186f..c8634d7 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/vrp74.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp74.c @@ -1,3 +1,4 @@ +/* { dg-do run } */ /* { dg-options "-O2" } */ void abort (void); diff --git a/gcc/testsuite/gcc.target/nvptx/abort.c b/gcc/testsuite/gcc.target/nvptx/abort.c index d322068..69eec19 100644 --- a/gcc/testsuite/gcc.target/nvptx/abort.c +++ b/gcc/testsuite/gcc.target/nvptx/abort.c @@ -1,4 +1,4 @@ -/* { dg-do compile} */ +/* { dg-do compile } */ /* Annotate no return functions with a trailing 'trap'. */ extern void abort (); -- cgit v1.1