http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50384
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Status|UNCONFIRMED |NEW Last reconfirmed| |2012-01-28 Component|other |middle-end Summary|Copying a char array |Returning std::array is not | |optimal Ever Confirmed|0 |1 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-28 19:34:40 UTC --- (In reply to comment #1) > Don't know if it is the same problem, but gcc seems to have trouble optimizing > with structs: The issue with comment #1 is simple, f is not being marked as a tail call. The issue with comment #2 is harder, the expanding of the function call is a bit bogus so is the return.