diff mbox series

testsuite: Only run -fcf-protection test on i?86/x86_64 [PR107213]

Message ID 20221011165750.328974-1-polacek@redhat.com
State New
Headers show
Series testsuite: Only run -fcf-protection test on i?86/x86_64 [PR107213] | expand

Commit Message

Marek Polacek Oct. 11, 2022, 4:57 p.m. UTC
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.

Tested on x86_64-pc-linux-gnu, ok for trunk?

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(+)


base-commit: 637e3668fdc17c4e226538fb14f9fab225433d01

Comments

Jeff Law Oct. 12, 2022, 5:01 p.m. UTC | #1
On 10/11/22 10:57, Marek Polacek via Gcc-patches wrote:
> 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.
>
> Tested on x86_64-pc-linux-gnu, ok for trunk?
>
> gcc/testsuite/ChangeLog:
>
> 	* c-c++-common/pointer-to-fn1.c: Only run on i?86/x86_64.

OK.

jeff
diff mbox series

Patch

diff --git a/gcc/testsuite/c-c++-common/pointer-to-fn1.c b/gcc/testsuite/c-c++-common/pointer-to-fn1.c
index 975885462e9..e2f948d824a 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.  */