From 6f0b0cdb8a2b169169697c5ca533a676d0da4089 Mon Sep 17 00:00:00 2001 From: David Edelsohn Date: Wed, 12 Jul 2023 14:31:20 -0400 Subject: [PATCH] testsuite: dg-require LTO for libgomp LTO tests Some test cases in libgomp testsuite pass -flto as an option, but the testcases do not require LTO target support. This patch adds the necessary DejaGNU requirement for LTO support to the testcases.. libgomp/ChangeLog: * testsuite/libgomp.c++/target-map-class-2.C: Require LTO. * testsuite/libgomp.c-c++-common/requires-4.c: Require LTO. * testsuite/libgomp.c-c++-common/requires-4a.c: Require LTO. Signed-off-by: David Edelsohn --- libgomp/testsuite/libgomp.c++/target-map-class-2.C | 1 + libgomp/testsuite/libgomp.c-c++-common/requires-4.c | 1 + libgomp/testsuite/libgomp.c-c++-common/requires-4a.c | 1 + 3 files changed, 3 insertions(+) diff --git a/libgomp/testsuite/libgomp.c++/target-map-class-2.C b/libgomp/testsuite/libgomp.c++/target-map-class-2.C index 1ef20f7ec22..3463abf858c 100644 --- a/libgomp/testsuite/libgomp.c++/target-map-class-2.C +++ b/libgomp/testsuite/libgomp.c++/target-map-class-2.C @@ -1,3 +1,4 @@ +/* { dg-require-effective-target lto } */ /* { dg-additional-options "-flto" } */ /* PR middle-end/109816 */ diff --git a/libgomp/testsuite/libgomp.c-c++-common/requires-4.c b/libgomp/testsuite/libgomp.c-c++-common/requires-4.c index 5883eff0d93..8cb4821ee53 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/requires-4.c +++ b/libgomp/testsuite/libgomp.c-c++-common/requires-4.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target lto } */ /* { dg-additional-options "-flto" } */ /* { dg-additional-options "-foffload-options=nvptx-none=-misa=sm_35" { target { offload_target_nvptx } } } */ /* { dg-additional-sources requires-4-aux.c } */ diff --git a/libgomp/testsuite/libgomp.c-c++-common/requires-4a.c b/libgomp/testsuite/libgomp.c-c++-common/requires-4a.c index 4fb9783a97a..0e0db927c2c 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/requires-4a.c +++ b/libgomp/testsuite/libgomp.c-c++-common/requires-4a.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target lto } */ /* { dg-additional-options "-flto" } */ /* { dg-additional-options "-foffload-options=nvptx-none=-misa=sm_35" { target { offload_target_nvptx } } } */ /* { dg-additional-sources requires-4-aux.c } */