https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99991
Bug ID: 99991 Summary: Missed inlining of IPA SRA clone Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org CC: marxin at gcc dot gnu.org Target Milestone: --- extern void foo(void); static int a, b; static int c() { foo(); while (1) while (b) foo(); } void d() { if (a) c(); } int main() { d(); return 0; } optimizes away the call to foo() at -O1 but not at -O3. At -O1 we inline c() but at -O3 we create an ISRA clone but do not even seem to consider to inline it?