38 lines
1.2 KiB
Diff
38 lines
1.2 KiB
Diff
From 071f26ce18db5a09cbae0607b065028a09a856ac Mon Sep 17 00:00:00 2001
|
|
From: Marek Polacek <polacek@redhat.com>
|
|
Date: Tue, 11 Oct 2022 12:51:40 -0400
|
|
Subject: [PATCH 140/157] [Backport][SME] testsuite: Only run -fcf-protection
|
|
test on i?86/x86_64 [PR107213]
|
|
|
|
Reference: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=cc694f45087c892e69ebbb177203c708f00b1bc7
|
|
|
|
This test fails on non-i?86/x86_64 targets because on those targets
|
|
we get
|
|
|
|
error: '-fcf-protection=full' is not supported for this target
|
|
|
|
so this patch limits where the test is run.
|
|
|
|
PR testsuite/107213
|
|
|
|
gcc/testsuite/ChangeLog:
|
|
|
|
* c-c++-common/pointer-to-fn1.c: Only run on i?86/x86_64.
|
|
---
|
|
gcc/testsuite/c-c++-common/pointer-to-fn1.c | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/gcc/testsuite/c-c++-common/pointer-to-fn1.c b/gcc/testsuite/c-c++-common/pointer-to-fn1.c
|
|
index 975885462..e2f948d82 100644
|
|
--- a/gcc/testsuite/c-c++-common/pointer-to-fn1.c
|
|
+++ b/gcc/testsuite/c-c++-common/pointer-to-fn1.c
|
|
@@ -1,4 +1,5 @@
|
|
/* PR c++/106937 */
|
|
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
|
|
/* { dg-options "-fcf-protection" } */
|
|
/* { dg-additional-options "-std=c++11 -fpermissive" { target c++ } } */
|
|
/* Test printing a pointer to function with attribute. */
|
|
--
|
|
2.33.0
|
|
|