[Bug lto/112716] LTO optimization with struct with variable size

2023-11-28 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112716 --- Comment #9 from Martin Uecker --- (In reply to Richard Biener from comment #8) > (In reply to uecker from comment #7) > > > > > > > Note that even without LTO when you enable inlining you'd expose two > > > different structures with two

[Bug lto/112716] LTO optimization with struct with variable size

2023-11-28 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112716 --- Comment #8 from Richard Biener --- (In reply to uecker from comment #7) > (In reply to rguent...@suse.de from comment #6) > > On Mon, 27 Nov 2023, muecker at gwdg dot de wrote: > > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112716

[Bug lto/112716] LTO optimization with struct with variable size

2023-11-27 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112716 --- Comment #7 from uecker at gcc dot gnu.org --- (In reply to rguent...@suse.de from comment #6) > On Mon, 27 Nov 2023, muecker at gwdg dot de wrote: > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112716 > > > > --- Comment #5 from Martin

[Bug lto/112716] LTO optimization with struct with variable size

2023-11-27 Thread rguenther at suse dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112716 --- Comment #6 from rguenther at suse dot de --- On Mon, 27 Nov 2023, muecker at gwdg dot de wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112716 > > --- Comment #5 from Martin Uecker --- > It works (and is required to work) for

[Bug lto/112716] LTO optimization with struct with variable size

2023-11-27 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112716 --- Comment #5 from Martin Uecker --- It works (and is required to work) for other types, e.g. [[gnu::noinline,gnu::noipa]] int foo(void *p, void *q) { int n = 5; int (*p2)[n] = p; (*p2)[0] = 1; bar(q);

[Bug lto/112716] LTO optimization with struct with variable size

2023-11-27 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112716 --- Comment #4 from Richard Biener --- Not that local types are never "merged" for cross-TU aliasing, they keep being distinct types. In particular this applies to VLA types since the reference to function-local vars ties them to the function