https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119492
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #1) > The PR119376 patch ought to handle this (for musttail only of course, > otherwise unless we can prove it escaped but isn't observable by the > potential tail call callee, we can't do a tail call). So looking into the history of this code. The original testcase which would fail due to this has a tail call now and works. Maybe a better testcase: ``` struct foo { int a[3]; }; __attribute__((noinline)) void brother (int a, int b) { if (a) __builtin_abort (); } __attribute__((noinline)) void sister (struct foo f, int b) { int *tmp = f.a; brother (tmp[b] == b, b); } int main (void) { struct foo f = { {7,8,9}}; sister (f, 1); return 0; } ``` I am still trying to figure out if the tail call here would cause a failure.