Hi Igor, > Here is the updated patch. Please note the subject should say PR 84145.
the two new testcases FAIL on all non-x86 targets (I've seen that on sparc-sun-solaris2.11, there's a gcc-testresults posting for powerpc64le-unknown-linux-gnu, and PR testsuite/84243 reports it for aarch64-none-linux-gnu: +FAIL: c-c++-common/fcf-protection-6.c -std=gnu++11 (test for errors, line ) +FAIL: c-c++-common/fcf-protection-6.c -std=gnu++11 (test for excess errors) +FAIL: c-c++-common/fcf-protection-6.c -std=gnu++14 (test for errors, line ) +FAIL: c-c++-common/fcf-protection-6.c -std=gnu++14 (test for excess errors) +FAIL: c-c++-common/fcf-protection-6.c -std=gnu++98 (test for errors, line ) +FAIL: c-c++-common/fcf-protection-6.c -std=gnu++98 (test for excess errors) Excess errors: xg++: error: unrecognized command line option '-mshstk' +FAIL: c-c++-common/fcf-protection-7.c -std=gnu++11 (test for errors, line ) +FAIL: c-c++-common/fcf-protection-7.c -std=gnu++11 (test for excess errors) +FAIL: c-c++-common/fcf-protection-7.c -std=gnu++14 (test for errors, line ) +FAIL: c-c++-common/fcf-protection-7.c -std=gnu++14 (test for excess errors) +FAIL: c-c++-common/fcf-protection-7.c -std=gnu++98 (test for errors, line ) +FAIL: c-c++-common/fcf-protection-7.c -std=gnu++98 (test for excess errors) Excess errors: xg++: error: unrecognized command line option '-mibt' I think the right way to handle that is to pass -mshstk resp. -mibt on x86 only. The following patch does this; tested with the appropriate runtest invocation on i386-pc-solaris2.11 and sparc-sun-solaris2.11. Ok for mainline? Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University 2018-02-06 Rainer Orth <r...@cebitec.uni-bielefeld.de> 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.
# HG changeset patch # Parent bc1af87b4176f6f5ddc900980a18df826cbf4553 Don't pass x86-only options on non-x86 targets in c-c++-common/fcf-protection-[67].c diff --git a/gcc/testsuite/c-c++-common/fcf-protection-6.c b/gcc/testsuite/c-c++-common/fcf-protection-6.c --- 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 --- 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 } */