https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83330
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Zdenek Sojka from comment #0) > Also, I do not understand why bar() is apparently inlined, when the function bar isn't inlined. Instead ipa-pure-const determines it is a const function and because nothing really needs its return value, it is just not called at all. > has noinline,noclone attributes (noipa helps; -fno-ipa-pure-const helps > too); but "noipa" implies just noinline,noclone,no_icf according to > https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common- > Function-Attributes No, it doesn't say anything like that. It says it implies those attributes, but is not a mere union of those 3 attributes, but disables many other IPA optimizes between that function and the callers. E.g. mere noinline, noclone, no_icf doesn't disable IPA VRP, or IPA bitwise CCP, etc.