https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82476
--- Comment #6 from Arun Muralidharan ---
I understand your point on why it chose not to be inlined. I was doing a micro
benchmark for a sample application (a interview question basically) and thats
when this issue came up.
Thanks.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82476
--- Comment #5 from Jonathan Wakely ---
(In reply to Andrew Pinski from comment #4)
> Note GCC knows main can only be called once (calling main more than once in
> C/C++ is undefined IIRC)
It's undefined in C++, I don't think it is in C.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82476
--- Comment #4 from Andrew Pinski ---
Note GCC knows main can only be called once (calling main more than once in
C/C++ is undefined IIRC) which is why this heuristic is there.
If you change the name from main to say ff, then the function gets
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82476
Andrew Pinski changed:
What|Removed |Added
Status|WAITING |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82476
--- Comment #2 from Marc Glisse ---
What is the point of inlining it? It isn't a hot call (called once from main).
And unless you are using something like -flto of -fwhole-program (which would
turn the function static), it has to be emitted as a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82476
Eric Botcazou changed:
What|Removed |Added
Status|UNCONFIRMED |WAITING
Last reconfirmed|