Fix gcc.dg/ipa/inline-8.c for -fPIC
The problem here is with -fPIC, both cmp and move don't bind locally so they are not even tried to be inlined. This fixes the issue by marking both functions as static and now the testcase passes for both -fPIC and -fno-PIC cases. OK? Tested on x86_64-linux-gnu. gcc/testsuite/ChangeLog: * gcc.dg/ipa/inline-8.c: Mark cmp and move as static so they both bind local and available for inlinine.
This commit is contained in:
parent
2dc6782a06
commit
aba800615e
1 changed files with 2 additions and 2 deletions
|
@ -6,13 +6,13 @@
|
|||
#include <math.h>
|
||||
extern int isnanf (float);
|
||||
/* Can't be inlined because isnanf will be optimized out. */
|
||||
int
|
||||
static int
|
||||
cmp (float a)
|
||||
{
|
||||
return isnanf (a);
|
||||
}
|
||||
/* Can be inlined. */
|
||||
int
|
||||
static int
|
||||
move (int a)
|
||||
{
|
||||
return a;
|
||||
|
|
Loading…
Add table
Reference in a new issue