public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2184] testsuite: mips: use noinline attribute instead of -fno-inline
@ 2021-07-09  6:33 Xi Ruoyao
  0 siblings, 0 replies; only message in thread
From: Xi Ruoyao @ 2021-07-09  6:33 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:3b33b1136d5ba1903a56fa601a848accc3db46ef

commit r12-2184-g3b33b1136d5ba1903a56fa601a848accc3db46ef
Author: Xi Ruoyao <xry111@mengyan1223.wang>
Date:   Tue Jun 22 14:15:45 2021 +0800

    testsuite: mips: use noinline attribute instead of -fno-inline
    
    mips.exp does not support -fno-inline, causing the tests return "ERROR:
    Unrecognised option: -fno-inline for dg-options ... ".
    
    Use noinline attribute like other mips target tests, to workaround it.
    
    gcc/testsuite/
    
            * gcc.target/mips/cfgcleanup-jalr2.c: Remove -fno-inline and add
              __attribute__((noinline)).
            * gcc.target/mips/cfgcleanup-jalr3.c: Likewise.

Diff:
---
 gcc/testsuite/gcc.target/mips/cfgcleanup-jalr2.c | 11 ++++++++---
 gcc/testsuite/gcc.target/mips/cfgcleanup-jalr3.c |  6 +++---
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/gcc/testsuite/gcc.target/mips/cfgcleanup-jalr2.c b/gcc/testsuite/gcc.target/mips/cfgcleanup-jalr2.c
index bf22f064288..6a9f86a3be0 100644
--- a/gcc/testsuite/gcc.target/mips/cfgcleanup-jalr2.c
+++ b/gcc/testsuite/gcc.target/mips/cfgcleanup-jalr2.c
@@ -1,10 +1,15 @@
 /* { dg-do compile } */
-/* { dg-options "-mabicalls -fpic -mno-mips16 -mno-micromips -fno-inline -fipa-ra -mcompact-branches=never" } */
+/* { dg-options "-mabicalls -fpic -mno-mips16 -mno-micromips -fipa-ra -mcompact-branches=never" } */
 /* { dg-skip-if "needs codesize optimization" { *-*-* } { "-O0" "-O1" "-O2" "-O3" } { "" } } */
 
-static int foo (void* p) { __asm__ (""::"r"(p):"$t0"); return 0; }
+static int __attribute__((noinline))
+foo (void* p)
+{
+  __asm__ (""::"r"(p):"$t0");
+  return 0;
+}
 
-static int bar (void* p) { return 1; }
+__attribute__((noinline)) static int bar (void* p) { return 1; }
 
 int
 test (void* p)
diff --git a/gcc/testsuite/gcc.target/mips/cfgcleanup-jalr3.c b/gcc/testsuite/gcc.target/mips/cfgcleanup-jalr3.c
index 805b31af9f0..50937412827 100644
--- a/gcc/testsuite/gcc.target/mips/cfgcleanup-jalr3.c
+++ b/gcc/testsuite/gcc.target/mips/cfgcleanup-jalr3.c
@@ -1,10 +1,10 @@
 /* { dg-do compile } */
-/* { dg-options "-mabicalls -fpic -mno-mips16 -mno-micromips -fno-inline -fipa-ra -mcompact-branches=never" } */
+/* { dg-options "-mabicalls -fpic -mno-mips16 -mno-micromips -fipa-ra -mcompact-branches=never" } */
 /* { dg-skip-if "needs codesize optimization" { *-*-* } { "-O0" "-O1" "-O2" "-O3" } { "" } } */
 
-static int foo (void* p) { return 0; }
+__attribute__((noinline)) static int foo (void* p) { return 0; }
 
-static int bar (void* p) { return 1; }
+__attribute__((noinline)) static int bar (void* p) { return 1; }
 
 int
 test (void* p)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-09  6:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-09  6:33 [gcc r12-2184] testsuite: mips: use noinline attribute instead of -fno-inline Xi Ruoyao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).