From abd78dc61076120649ccc1ca0b1d74d0b0a22f81 Mon Sep 17 00:00:00 2001 From: Paul-Antoine Arras Date: Thu, 26 Oct 2023 18:51:59 +0200 Subject: [PATCH] Add effective target to OpenMP tests This adds an effective target DejaGnu directive to prevent these testcases from failing on GCC configurations that do not support OpenMP. This fixes 8d2130a4e5c. gcc/testsuite/ChangeLog: * gfortran.dg/c_ptr_tests_20.f90: Add "fopenmp" effective target. * gfortran.dg/c_ptr_tests_21.f90: Add "fopenmp" effective target. --- gcc/testsuite/gfortran.dg/c_ptr_tests_20.f90 | 1 + gcc/testsuite/gfortran.dg/c_ptr_tests_21.f90 | 1 + 2 files changed, 2 insertions(+) diff --git a/gcc/testsuite/gfortran.dg/c_ptr_tests_20.f90 b/gcc/testsuite/gfortran.dg/c_ptr_tests_20.f90 index 7dd510400f32..131603d38197 100644 --- a/gcc/testsuite/gfortran.dg/c_ptr_tests_20.f90 +++ b/gcc/testsuite/gfortran.dg/c_ptr_tests_20.f90 @@ -1,4 +1,5 @@ ! { dg-do compile } +! { dg-require-effective-target fopenmp } ! { dg-additional-options "-fopenmp" } ! ! This failed to compile the declare variant directive due to the C_PTR diff --git a/gcc/testsuite/gfortran.dg/c_ptr_tests_21.f90 b/gcc/testsuite/gfortran.dg/c_ptr_tests_21.f90 index 05ccb771eee8..060d29d02759 100644 --- a/gcc/testsuite/gfortran.dg/c_ptr_tests_21.f90 +++ b/gcc/testsuite/gfortran.dg/c_ptr_tests_21.f90 @@ -1,4 +1,5 @@ ! { dg-do compile } +! { dg-require-effective-target fopenmp } ! { dg-additional-options "-fopenmp" } ! ! Ensure that C_PTR and C_FUNPTR are reported as incompatible types in variant -- 2.47.2