testsuite: Fix omp-parallel-for-get-min.c and -for-1.c for non-openmp

Message ID 20230308045839.D4D7D203F2@pchp3.se.axis.com
State Repeat Merge
Headers
Series testsuite: Fix omp-parallel-for-get-min.c and -for-1.c for non-openmp |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Hans-Peter Nilsson March 8, 2023, 4:58 a.m. UTC
  Committed as obvious.
-- >8 --
The recently added tests missed checking for "fopenmp" (see
other tests where "-fopenmp" is passed), which makes them
fail on non-openmp systems.

	* gcc.dg/analyzer/omp-parallel-for-get-min.c,
	gcc.dg/analyzer/omp-parallel-for-1.c: Require effective target fopenmp.
---
 gcc/testsuite/gcc.dg/analyzer/omp-parallel-for-1.c       | 1 +
 gcc/testsuite/gcc.dg/analyzer/omp-parallel-for-get-min.c | 1 +
 2 files changed, 2 insertions(+)
  

Comments

David Malcolm March 8, 2023, 9:55 p.m. UTC | #1
On Wed, 2023-03-08 at 05:58 +0100, Hans-Peter Nilsson wrote:
> Committed as obvious.
> -- >8 --
> The recently added tests missed checking for "fopenmp" (see
> other tests where "-fopenmp" is passed), which makes them
> fail on non-openmp systems.

Sorry about that; thanks for the fix.
Dave
  

Patch

diff --git a/gcc/testsuite/gcc.dg/analyzer/omp-parallel-for-1.c b/gcc/testsuite/gcc.dg/analyzer/omp-parallel-for-1.c
index dae940dac200..cadacc842750 100644
--- a/gcc/testsuite/gcc.dg/analyzer/omp-parallel-for-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/omp-parallel-for-1.c
@@ -1,3 +1,4 @@ 
+/* { dg-require-effective-target fopenmp } */
 /* { dg-additional-options "-fopenmp -Wall" } */
 
 typedef struct _Image
diff --git a/gcc/testsuite/gcc.dg/analyzer/omp-parallel-for-get-min.c b/gcc/testsuite/gcc.dg/analyzer/omp-parallel-for-get-min.c
index a7e64e1a3a85..ba9f634cd716 100644
--- a/gcc/testsuite/gcc.dg/analyzer/omp-parallel-for-get-min.c
+++ b/gcc/testsuite/gcc.dg/analyzer/omp-parallel-for-get-min.c
@@ -1,5 +1,6 @@ 
 /* Reduced from ImageMagick-7.1.0-57's MagickCore/attribute.c: GetEdgeBackgroundColor */
 
+/* { dg-require-effective-target fopenmp } */
 /* { dg-additional-options "-fopenmp -Wall" } */
 
 extern double get_census (void);