https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106077
Bug ID: 106077 Summary: Invalid IPA-SRA with non-call exceptions Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: hubicka at gcc dot gnu.org CC: marxin at gcc dot gnu.org Target Milestone: --- Compiled with -O2 -fno-ipa-cp we make t() to trap instead of calling non-call-exception from wrap short e,f; static __attribute__ ((noinline)) int a(int *b) { return *b; } static __attribute__ ((noinline)) __attribute__ ((optimize("non-call-exceptions"))) int wrap(int *b,int e, int f) { e/=f; return a(b)+e; } int t() { return wrap(0,1,0); }