[Bug middle-end/106725] LTO semantics for __attribute__((leaf))

2022-10-31 Thread dthorn at google dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106725 --- Comment #7 from Daniel Thornburgh --- Correction: A compilation line was missed: +$ gcc -flto -c -O2 main.c lto.c $ gcc -c -O2 ext.c

[Bug middle-end/106725] LTO semantics for __attribute__((leaf))

2022-10-31 Thread dthorn at google dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106725 --- Comment #6 from Daniel Thornburgh --- I spent a little more time on this, and here's a more concrete reproducer of GCC's current behavior. The setup again has 3 files: main.c, lto.c, and ext.c. lto.c is a simple getter-setter interface wrap

[Bug middle-end/106725] LTO semantics for __attribute__((leaf))

2022-08-25 Thread dthorn at google dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106725 --- Comment #4 from Daniel Thornburgh --- (In reply to rguent...@suse.de from comment #3) > As said, GCC shouldn't assume this since leaf is defined at translation > unit level, not at LTO level. Sure, but what prevents GCC from making this ass

[Bug middle-end/106725] LTO semantics for __attribute__((leaf))

2022-08-24 Thread dthorn at google dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106725 --- Comment #2 from Daniel Thornburgh --- (In reply to Richard Biener from comment #1) > If GCC, with LTO, would partition the program into two LTRANS partitions, > one containing main and bar and one containing foo then applying this > optimiza

[Bug c/106725] New: LTO semantics for __attribute__((leaf))

2022-08-23 Thread dthorn at google dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106725 Bug ID: 106725 Summary: LTO semantics for __attribute__((leaf)) Product: gcc Version: 12.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c