Comment 11 for bug 1418073

Revision history for this message
Rahul (rahulgm) wrote :

I tried following code snippet put in single file:

volatile int x;
void __attribute__((section (".section1")))
foo()
{
        x++;
}
void main()
{
 foo ();
 /* some other code */
}

I have found that without LTO foo() goes into .section1, but with LTO it is inlined and goes into .text. I am using "gcc version 4.9.3 20141119 (release) [ARM/embedded-4_9-branch revision 218278]"

This is not what you had suggested would happen. foo() should have been inlined no matter LTO is enabled or not.