This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/50384] Returning std::array is not optimal
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 28 Jan 2012 19:34:40 +0000
- Subject: [Bug middle-end/50384] Returning std::array is not optimal
- Auto-submitted: auto-generated
- References: <bug-50384-4@http.gcc.gnu.org/bugzilla/>
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.