[Bug lto/77472] __attribute__((flatten)) when used with -flto can lead to extreme number of inlined functions

hubicka at ucw dot cz gcc-bugzilla@gcc.gnu.org
Sun Sep 4 15:28:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77472

--- Comment #7 from Jan Hubicka <hubicka at ucw dot cz> ---
> I'm not sure what is the best way forward.
> Maybe gcc should ignore __attribute__((flatten)) when using LTO
> unconditionally?

Well, I am not sure - flatten can make compiler explode without LTO, too,
and I can imagine that in future one may want to do cross-module flattening.
Of course we can document flatten as being applied at compile time only and
eventually intorduce lto_flatten if need for link time flattening arrises,
so existing codebases does not explode.

Honza


More information about the Gcc-bugs mailing list