[Bug c/78903] __attribute__((section(".ram"))) ignored with -Os or -flto

2021-09-17 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78903

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |INVALID
 Status|UNCONFIRMED |RESOLVED

--- Comment #3 from Andrew Pinski  ---
As mentioned section does not block inlining.  So this is exacted.  You need to
use noinline or noipa to get that effect.

[Bug c/78903] __attribute__((section(".ram"))) ignored with -Os or -flto

2016-12-22 Thread chrysn at fsfe dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78903

--- Comment #2 from chrysn at fsfe dot org ---
I don't care about the function being inlined in general, I just don't want it
inlined into different sections -- that's why I'd consider noinline a
workaround.

Anyhow, if that is the definite answer, I'd like to suggest the following
addition to the common-function-attributes documentation on section:

"[ of the linker instead.] The section applies when the function is placed as a
whole; it can still be inlined into code in other sections."

[Bug c/78903] __attribute__((section(".ram"))) ignored with -Os or -flto

2016-12-22 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78903

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek  ---
noinline is not a workaround; if you don't want some function to be inlined,
use noinline attribute, period.  The section attribute itself is not a reason
not to inline (and should not be).