From: Xi Ruoyao Date: Tue, 22 Jun 2021 06:15:45 +0000 (+0800) Subject: testsuite: mips: use noinline attribute instead of -fno-inline X-Git-Tag: basepoints/gcc-13~6129 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b33b1136d5ba1903a56fa601a848accc3db46ef;p=thirdparty%2Fgcc.git 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 --git a/gcc/testsuite/gcc.target/mips/cfgcleanup-jalr2.c b/gcc/testsuite/gcc.target/mips/cfgcleanup-jalr2.c index bf22f0642888..6a9f86a3be00 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 805b31af9f08..509374128273 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)