https://gcc.gnu.org/g:ea5907d6d458b1c9318814c96ebb277c7c8505f5

commit r14-10428-gea5907d6d458b1c9318814c96ebb277c7c8505f5
Author: Christoph Müllner <christoph.muell...@vrull.eu>
Date:   Fri Jul 5 09:53:34 2024 +0200

    RISC-V: testsuite: Properly gate LTO tests
    
    There are two test cases with the following skip directive:
      dg-skip-if "" { *-*-* } { "-flto -fno-fat-lto-objects" }
    This reads as: skip if both '-flto' and '-fno-fat-lto-objects'
    are present.  This is not the case if only '-flto' is present.
    
    Since both tests depend on instruction sequences (one does
    check-function-bodies the other tests for an assembler error
    message), they won't work reliably with fat LTO objects.
    
    Let's change the skip line to gate the test on '-flto'
    to avoid failing tests like this:
    
    FAIL: gcc.target/riscv/interrupt-misaligned.c   -O2 -flto   
check-function-bodies interrupt
    FAIL: gcc.target/riscv/interrupt-misaligned.c   -O2 -flto 
-flto-partition=none   check-function-bodies interrupt
    FAIL: gcc.target/riscv/pr93202.c   -O2 -flto   (test for errors, line 10)
    FAIL: gcc.target/riscv/pr93202.c   -O2 -flto   (test for errors, line 9)
    FAIL: gcc.target/riscv/pr93202.c   -O2 -flto -flto-partition=none   (test 
for errors, line 10)
    FAIL: gcc.target/riscv/pr93202.c   -O2 -flto -flto-partition=none   (test 
for errors, line 9)
    
    gcc/testsuite/ChangeLog:
    
            * gcc.target/riscv/interrupt-misaligned.c: Remove
            "-fno-fat-lto-objects" from skip condition.
            * gcc.target/riscv/pr93202.c: Likewise.
    
    (cherry picked from commit 0717d50fc4ff983b79093bdef43b04e4584cc3cd)
    Signed-off-by: Christoph Müllner <christoph.muell...@vrull.eu>

Diff:
---
 gcc/testsuite/gcc.target/riscv/interrupt-misaligned.c | 2 +-
 gcc/testsuite/gcc.target/riscv/pr93202.c              | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.target/riscv/interrupt-misaligned.c 
b/gcc/testsuite/gcc.target/riscv/interrupt-misaligned.c
index b5f8e6c2bbef..912f180e4d65 100644
--- a/gcc/testsuite/gcc.target/riscv/interrupt-misaligned.c
+++ b/gcc/testsuite/gcc.target/riscv/interrupt-misaligned.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -march=rv64gc -mabi=lp64d -fno-schedule-insns 
-fno-schedule-insns2" } */
-/* { dg-skip-if "" { *-*-* } { "-flto -fno-fat-lto-objects" } } */
+/* { dg-skip-if "" { *-*-* } { "-flto" } } */
 
 /*  Make sure no stack offset are misaligned.
 **  interrupt:
diff --git a/gcc/testsuite/gcc.target/riscv/pr93202.c 
b/gcc/testsuite/gcc.target/riscv/pr93202.c
index 5501191ea52c..5de003fac421 100644
--- a/gcc/testsuite/gcc.target/riscv/pr93202.c
+++ b/gcc/testsuite/gcc.target/riscv/pr93202.c
@@ -1,7 +1,7 @@
 /* PR inline-asm/93202 */
 /* { dg-do compile { target fpic } } */
 /* { dg-options "-fpic" } */
-/* { dg-skip-if "" { *-*-* } { "-flto -fno-fat-lto-objects" } } */
+/* { dg-skip-if "" { *-*-* } { "-flto" } } */
 
 void
 foo (void)

Reply via email to