From f43044a3d7856c6d8b88c706d1e078268e12f7af Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 21 Feb 2019 18:59:00 +0000 Subject: [PATCH] i386: Replace -fcf-protection with -fcf-protection=branch Since -mindirect-branch is incompatible with -fcf-protection=return and -fcf-protection, replace -fcf-protection with -fcf-protection=branch. PR target/87412 * gcc.target/i386/indirect-thunk-attr-14.c: Replace -fcf-protection with -fcf-protection=branch. * gcc.target/i386/indirect-thunk-attr-15.c: Likewise. * gcc.target/i386/indirect-thunk-attr-16.c: Likewise. * gcc.target/i386/indirect-thunk-extern-8.c: Likewise. * gcc.target/i386/indirect-thunk-extern-9.c: Likewise. * gcc.target/i386/indirect-thunk-extern-10.c: Likewise. From-SVN: r269074 --- gcc/testsuite/ChangeLog | 11 +++++++++++ .../gcc.target/i386/indirect-thunk-attr-14.c | 2 +- .../gcc.target/i386/indirect-thunk-attr-15.c | 2 +- .../gcc.target/i386/indirect-thunk-attr-16.c | 2 +- .../gcc.target/i386/indirect-thunk-extern-10.c | 2 +- .../gcc.target/i386/indirect-thunk-extern-8.c | 2 +- .../gcc.target/i386/indirect-thunk-extern-9.c | 2 +- 7 files changed, 17 insertions(+), 6 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8d51a72517a..0093df61df1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2019-02-21 H.J. Lu + + PR target/87412 + * gcc.target/i386/indirect-thunk-attr-14.c: Replace + -fcf-protection with -fcf-protection=branch. + * gcc.target/i386/indirect-thunk-attr-15.c: Likewise. + * gcc.target/i386/indirect-thunk-attr-16.c: Likewise. + * gcc.target/i386/indirect-thunk-extern-8.c: Likewise. + * gcc.target/i386/indirect-thunk-extern-9.c: Likewise. + * gcc.target/i386/indirect-thunk-extern-10.c: Likewise. + 2019-02-21 Wilco Dijkstra * gcc.target/arm/pr88850-2.c: Block -mfloat-abi override. diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-14.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-14.c index eb25139da6d..8516be5c8a6 100644 --- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-14.c +++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-14.c @@ -1,5 +1,5 @@ /* { dg-do compile { target *-*-linux* } } */ -/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic -fplt -mindirect-branch=keep -fcf-protection" } */ +/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic -fplt -mindirect-branch=keep -fcf-protection=branch" } */ extern void (*bar) (void); diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-15.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-15.c index 1ad459e3b19..28eafbafe39 100644 --- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-15.c +++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-15.c @@ -1,5 +1,5 @@ /* { dg-do compile { target *-*-linux* } } */ -/* { dg-options "-O2 -mindirect-branch-register -mfunction-return=keep -fno-pic -fplt -mindirect-branch=keep -fcf-protection" } */ +/* { dg-options "-O2 -mindirect-branch-register -mfunction-return=keep -fno-pic -fplt -mindirect-branch=keep -fcf-protection=branch" } */ extern void (*bar) (void); diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-16.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-16.c index 86fe035bc9a..737d85d48e8 100644 --- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-16.c +++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-16.c @@ -1,5 +1,5 @@ /* { dg-do compile { target *-*-linux* } } */ -/* { dg-options "-O2 -mindirect-branch-register -mfunction-return=keep -fno-pic -fplt -mindirect-branch=keep -fcf-protection" } */ +/* { dg-options "-O2 -mindirect-branch-register -mfunction-return=keep -fno-pic -fplt -mindirect-branch=keep -fcf-protection=branch" } */ extern void (*bar) (void) __attribute__((nocf_check)); diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-10.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-10.c index 95731d6f365..539781c492a 100644 --- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-10.c +++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-10.c @@ -1,5 +1,5 @@ /* { dg-do compile { target *-*-linux* } } */ -/* { dg-options "-O2 -mindirect-branch-register -mfunction-return=keep -fno-pic -fplt -mindirect-branch=thunk-extern -fcf-protection" } */ +/* { dg-options "-O2 -mindirect-branch-register -mfunction-return=keep -fno-pic -fplt -mindirect-branch=thunk-extern -fcf-protection=branch" } */ extern void (*bar) (void) __attribute__((nocf_check)); diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-8.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-8.c index 0c61516732a..2cef59de5ab 100644 --- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-8.c +++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-8.c @@ -1,5 +1,5 @@ /* { dg-do compile { target *-*-linux* } } */ -/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic -fplt -mindirect-branch=thunk-extern -fcf-protection" } */ +/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic -fplt -mindirect-branch=thunk-extern -fcf-protection=branch" } */ extern void (*bar) (void); diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-9.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-9.c index 731d4c4e6e9..a579cdde6ba 100644 --- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-9.c +++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-9.c @@ -1,5 +1,5 @@ /* { dg-do compile { target *-*-linux* } } */ -/* { dg-options "-O2 -mindirect-branch-register -mfunction-return=keep -fno-pic -fplt -mindirect-branch=thunk-extern -fcf-protection" } */ +/* { dg-options "-O2 -mindirect-branch-register -mfunction-return=keep -fno-pic -fplt -mindirect-branch=thunk-extern -fcf-protection=branch" } */ extern void (*bar) (void); -- 2.30.2