testsuite: fix c23-constexpr-2a.c test to use dg-do run

Message ID 2a4ee57b04398e54284e3d6b5ed4f8842ee26a5c.1730399917.git.sam@gentoo.org
State Committed
Commit 2a4ee57b04398e54284e3d6b5ed4f8842ee26a5c
Headers
Series testsuite: fix c23-constexpr-2a.c test to use dg-do run |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 fail Patch failed to apply

Commit Message

Sam James Oct. 31, 2024, 6:38 p.m. UTC
  The comment at the top of the test indicates it should be an execution test,
but it was only using 'dg-do link'. Correct that.

The only change in test results is as expected:
```
+PASS: gcc.dg/c23-constexpr-2a.c execution test
```

gcc/testsuite/ChangeLog:
	PR testsuite/117183

	* gcc.dg/c23-constexpr-2a.c: Use dg-do run.
---
OK?

 gcc/testsuite/gcc.dg/c23-constexpr-2a.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Joseph Myers Oct. 31, 2024, 6:40 p.m. UTC | #1
On Thu, 31 Oct 2024, Sam James wrote:

> The comment at the top of the test indicates it should be an execution test,
> but it was only using 'dg-do link'. Correct that.
> 
> The only change in test results is as expected:
> ```
> +PASS: gcc.dg/c23-constexpr-2a.c execution test
> ```
> 
> gcc/testsuite/ChangeLog:
> 	PR testsuite/117183
> 
> 	* gcc.dg/c23-constexpr-2a.c: Use dg-do run.

OK.
  

Patch

diff --git a/gcc/testsuite/gcc.dg/c23-constexpr-2a.c b/gcc/testsuite/gcc.dg/c23-constexpr-2a.c
index a08097a126bd..3fe3756f379a 100644
--- a/gcc/testsuite/gcc.dg/c23-constexpr-2a.c
+++ b/gcc/testsuite/gcc.dg/c23-constexpr-2a.c
@@ -1,5 +1,5 @@ 
 /* Test C23 constexpr.  Valid code, execution test.  */
-/* { dg-do link } */
+/* { dg-do run } */
 /* { dg-options "-std=c23 -pedantic-errors" } */
 /* { dg-additional-sources "c23-constexpr-2b.c" } */