Comment 5 for bug 1418073

Revision history for this message
Terry Guo (terry.guo) wrote :

For your case, the functions are in two different files, so gcc is unable to inline them when disable lto. When you enable lto, gcc works like all functions are defined in one file, so functions get inlined. That's why I define functions in one file.

Again please be noted that LTO works like all functions are in one file. When all functions are in one file, inline happens without considering the section attribute for both LTO or not LTO. This is a consistent behavor and this is also my point.