From 216c32f93f8be06686a210ab4ee084fcee3a07e6 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Tue, 6 Feb 2018 23:31:09 +0000 Subject: [PATCH] Don't pass x86-only options on non-x86 targets in c-c++-common/fcf-protection-[67].c (PR testsuite/84243) PR testsuite/84243 * c-c++-common/fcf-protection-6.c: Only pass -mshstk on x86 targets. * c-c++-common/fcf-protection-7.c: Likewise for -mibt. From-SVN: r257432 --- gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/c-c++-common/fcf-protection-6.c | 3 ++- gcc/testsuite/c-c++-common/fcf-protection-7.c | 3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4134471fad9..a32ef377294 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2018-02-07 Rainer Orth + + PR testsuite/84243 + * c-c++-common/fcf-protection-6.c: Only pass -mshstk on x86 + targets. + * c-c++-common/fcf-protection-7.c: Likewise for -mibt. + 2018-02-06 Jakub Jelinek PR target/84146 diff --git a/gcc/testsuite/c-c++-common/fcf-protection-6.c b/gcc/testsuite/c-c++-common/fcf-protection-6.c index 084983e4498..532e76e6915 100644 --- a/gcc/testsuite/c-c++-common/fcf-protection-6.c +++ b/gcc/testsuite/c-c++-common/fcf-protection-6.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fcf-protection=branch -mshstk" } */ +/* { dg-options "-fcf-protection=branch" } */ +/* { dg-additional-options "-mshstk" { target { i?86-*-* x86_64-*-* } } } */ /* { dg-error "'-fcf-protection=branch' requires Intel CET.*-mcet or -mibt option" "" { target { "i?86-*-* x86_64-*-*" } } 0 } */ /* { dg-error "'-fcf-protection=branch' is not supported for this target" "" { target { ! "i?86-*-* x86_64-*-*" } } 0 } */ diff --git a/gcc/testsuite/c-c++-common/fcf-protection-7.c b/gcc/testsuite/c-c++-common/fcf-protection-7.c index 9baedf5991a..4c879692708 100644 --- a/gcc/testsuite/c-c++-common/fcf-protection-7.c +++ b/gcc/testsuite/c-c++-common/fcf-protection-7.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fcf-protection=return -mibt" } */ +/* { dg-options "-fcf-protection=return" } */ +/* { dg-additional-options "-mibt" { target { i?86-*-* x86_64-*-* } } } */ /* { dg-error "'-fcf-protection=return' requires Intel CET.*-mcet or -mshstk option" "" { target { "i?86-*-* x86_64-*-*" } } 0 } */ /* { dg-error "'-fcf-protection=return' is not supported for this target" "" { target { ! "i?86-*-* x86_64-*-*" } } 0 } */ -- 2.30.2