From 23f352972faabe94606687558a66135f9a9e17fb Mon Sep 17 00:00:00 2001 From: David Edelsohn Date: Thu, 1 Jun 2023 15:16:27 -0400 Subject: [PATCH] testsuite: Require LTO for pr107557-[12].c pr107557-[12].c invoke -flto option but do not check that the target support LTO. This patch adds dg-require lto to the testcases. * gcc.dg/pr107557-1.c: Require LTO support. * gcc.dg/pr107557-2.c: Require LTO support. Signed-off-by: David Edelsohn --- gcc/testsuite/gcc.dg/pr107557-1.c | 1 + gcc/testsuite/gcc.dg/pr107557-2.c | 1 + 2 files changed, 2 insertions(+) diff --git a/gcc/testsuite/gcc.dg/pr107557-1.c b/gcc/testsuite/gcc.dg/pr107557-1.c index 88c248b6564..f14b784dbbf 100644 --- a/gcc/testsuite/gcc.dg/pr107557-1.c +++ b/gcc/testsuite/gcc.dg/pr107557-1.c @@ -1,5 +1,6 @@ /* PR107557 * { dg-do compile } + * { dg-require-effective-target lto } * { dg-options "-flto -fsanitize=undefined -fexceptions -Wno-incompatible-pointer-types" } */ diff --git a/gcc/testsuite/gcc.dg/pr107557-2.c b/gcc/testsuite/gcc.dg/pr107557-2.c index 2d26bb0b16a..e680d045165 100644 --- a/gcc/testsuite/gcc.dg/pr107557-2.c +++ b/gcc/testsuite/gcc.dg/pr107557-2.c @@ -1,5 +1,6 @@ /* PR107557 * { dg-do compile } + * { dg-require-effective-target lto } * { dg-options "-flto -fsanitize=undefined -fexceptions -Wno-incompatible-pointer-types" } */ -- 2.11.4.GIT