From: Rainer Orth Date: Tue, 6 Feb 2018 23:31:09 +0000 (+0000) Subject: Don't pass x86-only options on non-x86 targets in c-c++-common/fcf-protection-[67... X-Git-Tag: basepoints/gcc-9~1381 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=216c32f93f8be06686a210ab4ee084fcee3a07e6;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4134471fad9e..a32ef3772940 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 084983e4498e..532e76e69156 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 9baedf5991a3..4c879692708c 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 } */