[committed] Fix nios2 tests

Message ID 012d6223-8007-48b7-b63a-eac8e4fee869@gmail.com
State Committed
Commit 2280317c3771a28e9288b7f4c4c23aa4b0ac31dd
Headers
Series [committed] Fix nios2 tests |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-arm warning Patch is already merged
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 warning Patch is already merged

Commit Message

Jeff Law Dec. 3, 2023, 5:14 a.m. UTC
  The nios2 port has two tests that are affected by the recent changes. 
In cdx-ldstwm-1.c it was easiest to just add -fpermissive.  for 
cdx-ldstwm-2.c adding an prototype for exit and abort is all that's needed.

Pushed to the trunk,
Jeff
commit 2280317c3771a28e9288b7f4c4c23aa4b0ac31dd
Author: Jeff Law <jlaw@ventanamicro.com>
Date:   Sat Dec 2 22:12:55 2023 -0700

    [committed] Fix nios2 tests
    
    The nios2 port has two tests that are affected by the recent changes.  In
    cdx-ldstwm-1.c it was easiest to just add -fpermissive.  for cdx-ldstwm-2.c
    adding an prototype for exit and abort is all that's needed.
    
    gcc/testsuite
            * gcc.target/nios2/cdx-ldstwm-1.c: Add -fpermissive.
            * gcc.target/nios2/cdx-ldstwm-2.c: Add prototypes fro abort and exit.
  

Patch

diff --git a/gcc/testsuite/gcc.target/nios2/cdx-ldstwm-1.c b/gcc/testsuite/gcc.target/nios2/cdx-ldstwm-1.c
index 7beeea15e2f..6b7a7d0e7f4 100644
--- a/gcc/testsuite/gcc.target/nios2/cdx-ldstwm-1.c
+++ b/gcc/testsuite/gcc.target/nios2/cdx-ldstwm-1.c
@@ -1,5 +1,5 @@ 
 /* { dg-do assemble } */
-/* { dg-options "-O3 -fomit-frame-pointer -funroll-all-loops -finline-functions -march=r2 -mcdx -w" } */
+/* { dg-options "-O3 -fomit-frame-pointer -funroll-all-loops -finline-functions -march=r2 -mcdx -w -fpermissive" } */
 
 /* Based on gcc.c-torture/compile/920501-23.c.
    This test used to result in assembler errors with R2 CDX because of
diff --git a/gcc/testsuite/gcc.target/nios2/cdx-ldstwm-2.c b/gcc/testsuite/gcc.target/nios2/cdx-ldstwm-2.c
index 0e69534dcc1..eb273bbc5ec 100644
--- a/gcc/testsuite/gcc.target/nios2/cdx-ldstwm-2.c
+++ b/gcc/testsuite/gcc.target/nios2/cdx-ldstwm-2.c
@@ -1,6 +1,9 @@ 
 /* { dg-do assemble } */
 /* { dg-options "-O3 -fomit-frame-pointer -funroll-loops -march=r2 -mcdx -w" } */
 
+extern void abort (void);
+extern int exit (int);
+
 /* Based on gcc.c-torture/execute/20021120-1.c.
    This test used to result in assembler errors with R2 CDX because of
    a bug in regrename; it wasn't re-validating insns after renaming, so