https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84023
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- /* Can be inlined. */ int move (int a) { return a; } Both move and cmp should be static for this testcase to work under -fPIC. Basically we are testing to make sure cmp is not inlined but move is. with -fPIC, neither will even be tried to inline because they don't bind local. So we want to have both cmp and move as static. Mine. diff --git a/gcc/testsuite/gcc.dg/ipa/inline-8.c b/gcc/testsuite/gcc.dg/ipa/inline-8.c index 388283ca213..c51eec20fc8 100644 --- a/gcc/testsuite/gcc.dg/ipa/inline-8.c +++ b/gcc/testsuite/gcc.dg/ipa/inline-8.c @@ -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;