[gcc r17-3242] testsuite, aarch64: Gate CFI/CFA tests on the cfi effective target.

Iain D Sandoe via Gcc-cvs <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:15d60983ca428032c4a92fe9f195faa918ba5095

commit r17-3242-g15d60983ca428032c4a92fe9f195faa918ba5095
Author: Iain Sandoe <[email protected]>
Date:   Thu Oct 26 10:57:43 2023 +0100

    testsuite, aarch64: Gate CFI/CFA tests on the cfi effective target.
    
    Targets might not support .cfi_ instructions, gate tests that require
    these using the existing target supports.
    
    gcc/testsuite/ChangeLog:
    
            * gcc.target/aarch64/dwarf-cfa-reg.c: Require cfi instructions.
            * gcc.target/aarch64/stack-check-cfa-1.c: Likewise.
            * gcc.target/aarch64/stack-check-cfa-2.c: Likewise.
            * gcc.target/aarch64/stack-check-cfa-3.c: Likewise.
    
    Signed-off-by: Iain Sandoe <[email protected]>

Diff:
---
 gcc/testsuite/gcc.target/aarch64/dwarf-cfa-reg.c     | 1 +
 gcc/testsuite/gcc.target/aarch64/stack-check-cfa-1.c | 1 +
 gcc/testsuite/gcc.target/aarch64/stack-check-cfa-2.c | 1 +
 gcc/testsuite/gcc.target/aarch64/stack-check-cfa-3.c | 1 +
 4 files changed, 4 insertions(+)

diff --git a/gcc/testsuite/gcc.target/aarch64/dwarf-cfa-reg.c b/gcc/testsuite/gcc.target/aarch64/dwarf-cfa-reg.c
index ae5b37970213..f32e9b995f0e 100644
--- a/gcc/testsuite/gcc.target/aarch64/dwarf-cfa-reg.c
+++ b/gcc/testsuite/gcc.target/aarch64/dwarf-cfa-reg.c
@@ -1,5 +1,6 @@
 /* Verify that CFA register is restored to SP after FP is restored.  */
 /* { dg-do compile } */
+/* { dg-require-effective-target cfi } */
 /* { dg-options "-O0 -gdwarf-2" } */
 /* { dg-final { scan-assembler ".cfi_restore 30" } } */
 /* { dg-final { scan-assembler ".cfi_restore 29" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-1.c b/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-1.c
index 412a9ed1aab0..41e64efd42cd 100644
--- a/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-1.c
+++ b/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-1.c
@@ -1,6 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -funwind-tables -fno-stack-protector" } */
 /* { dg-require-effective-target supports_stack_clash_protection } */
+/* { dg-require-effective-target cfi } */
 
 #define SIZE 128*1024
 #include "stack-check-prologue.h"
diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-2.c b/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-2.c
index e440569a0785..269713e32aa8 100644
--- a/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-2.c
+++ b/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-2.c
@@ -1,6 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -funwind-tables -fno-stack-protector" } */
 /* { dg-require-effective-target supports_stack_clash_protection } */
+/* { dg-require-effective-target cfi } */
 
 #define SIZE 1280*1024 + 512
 #include "stack-check-prologue.h"
diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-3.c b/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-3.c
index c4b7bb601c44..77818bcc1670 100644
--- a/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-3.c
+++ b/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-3.c
@@ -1,6 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-O3 -fopenmp-simd -march=armv8-a+sve -fstack-clash-protection --param stack-clash-protection-guard-size=16 -funwind-tables" } */
 /* { dg-require-effective-target supports_stack_clash_protection } */
+/* { dg-require-effective-target cfi } */
 
 #include "stack-check-prologue-16.c"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.