These tests must be compiled with -mno-cet/-mno-ibt/-mno-shstk.
OK for trunk?
H.J.
---
* c-c++-common/fcf-protection-1.c: Likewise.
* c-c++-common/fcf-protection-2.c: Likewise.
* c-c++-common/fcf-protection-3.c: Likewise.
* c-c++-common/fcf-protection-5.c: Likewise.
* c-c++-common/fcf-protection-6.c: Likewise.
* c-c++-common/fcf-protection-7.c: Likewise.
---
gcc/testsuite/c-c++-common/fcf-protection-1.c | 1 +
gcc/testsuite/c-c++-common/fcf-protection-2.c | 1 +
gcc/testsuite/c-c++-common/fcf-protection-3.c | 1 +
gcc/testsuite/c-c++-common/fcf-protection-5.c | 1 +
gcc/testsuite/c-c++-common/fcf-protection-6.c | 2 +-
gcc/testsuite/c-c++-common/fcf-protection-7.c | 4 ++--
6 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/gcc/testsuite/c-c++-common/fcf-protection-1.c
b/gcc/testsuite/c-c++-common/fcf-protection-1.c
index 8e71f47dde0..8bdb3fa20fc 100644
--- a/gcc/testsuite/c-c++-common/fcf-protection-1.c
+++ b/gcc/testsuite/c-c++-common/fcf-protection-1.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-fcf-protection=full" } */
+/* { dg-additional-options "-mno-cet" { target i?86-*-* x86_64-*-* } } */
/* { dg-error "'-fcf-protection=full' requires Intel CET.*-mcet.*-mibt and
-mshstk option" "" { target { "i?86-*-* x86_64-*-*" } } 0 } */
/* { dg-error "'-fcf-protection=full' is not supported for this target" "" {
target { ! "i?86-*-* x86_64-*-*" } } 0 } */
diff --git a/gcc/testsuite/c-c++-common/fcf-protection-2.c
b/gcc/testsuite/c-c++-common/fcf-protection-2.c
index d7d6db0e95d..607693fae73 100644
--- a/gcc/testsuite/c-c++-common/fcf-protection-2.c
+++ b/gcc/testsuite/c-c++-common/fcf-protection-2.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-fcf-protection=branch" } */
+/* { dg-additional-options "-mno-cet" { 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-3.c
b/gcc/testsuite/c-c++-common/fcf-protection-3.c
index 5b903c5fa51..398df8bedea 100644
--- a/gcc/testsuite/c-c++-common/fcf-protection-3.c
+++ b/gcc/testsuite/c-c++-common/fcf-protection-3.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-fcf-protection=return" } */
+/* { dg-additional-options "-mno-cet" { 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 } */
diff --git a/gcc/testsuite/c-c++-common/fcf-protection-5.c
b/gcc/testsuite/c-c++-common/fcf-protection-5.c
index d7a67801e2e..d22b359a8f7 100644
--- a/gcc/testsuite/c-c++-common/fcf-protection-5.c
+++ b/gcc/testsuite/c-c++-common/fcf-protection-5.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-fcf-protection" } */
+/* { dg-additional-options "-mno-cet" { target { i?86-*-* x86_64-*-* } } } */
/* { dg-error "'-fcf-protection=full' requires Intel CET.*-mcet.*-mibt and
-mshstk option" "" { target { "i?86-*-* x86_64-*-*" } } 0 } */
/* { dg-error "'-fcf-protection=full' is not supported for this target" "" {
target { ! "i?86-*-* x86_64-*-*" } } 0 } */
diff --git a/gcc/testsuite/c-c++-common/fcf-protection-6.c
b/gcc/testsuite/c-c++-common/fcf-protection-6.c
index 532e76e6915..e1d1df2ffd6 100644
--- a/gcc/testsuite/c-c++-common/fcf-protection-6.c
+++ b/gcc/testsuite/c-c++-common/fcf-protection-6.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-fcf-protection=branch" } */
-/* { dg-additional-options "-mshstk" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-additional-options "-mshstk -mno-ibt" { 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 4c879692708..510fc1970da 100644
--- a/gcc/testsuite/c-c++-common/fcf-protection-7.c
+++ b/gcc/testsuite/c-c++-common/fcf-protection-7.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fcf-protection=return" } */
-/* { dg-additional-options "-mibt" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-options "-fcf-protection=return -mno-cet" } */
+/* { dg-additional-options "-mibt -mno-shstk" { 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.14.3