https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101949
--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> --- > cat gcc/testsuite/gcc.dg/lto/pr101949_0.c /* { dg-lto-do run } */ /* { dg-lto-options { "-O2 -fipa-pta -flto -flto-partition=1to1" } } */ extern int bar (int (*)(int *), int *); static int x; static int __attribute__ ((noinline)) foo (int *p) { *p = 1; x = 0; return *p; } int main () { if (bar (foo, &x) != 0) __builtin_abort (); return 0; } > cat gcc/testsuite/gcc.dg/lto/pr101949_1.c int __attribute__((noinline,noclone)) bar (int (*fn)(int *), int *p) { return fn (p); }