[Bug c++/41997] [C++0x] constant initializer_list not optimised
--- Comment #5 from jason at gcc dot gnu dot org 2010-02-15 14:50 --- Fixed for 4.5. -- jason at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED Target Milestone|--- |4.5.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41997
[Bug c++/41997] [C++0x] constant initializer_list not optimised
--- Comment #4 from jason at gcc dot gnu dot org 2010-02-14 15:17 --- Subject: Bug 41997 Author: jason Date: Sun Feb 14 15:17:30 2010 New Revision: 156760 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=156760 Log: PR c++/41997 * semantics.c (finish_compound_literal): Use cp_apply_type_quals_to_decl when creating a static variable. Added: trunk/gcc/testsuite/g++.dg/cpp0x/initlist-opt.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/semantics.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41997
[Bug c++/41997] [C++0x] constant initializer_list not optimised
-- jason at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |jason at gcc dot gnu dot org |dot org | Status|NEW |ASSIGNED Last reconfirmed|2009-11-10 08:28:00 |2010-02-14 05:56:43 date|| Version|4.5.0 |4.4.4 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41997
[Bug c++/41997] [C++0x] constant initializer_list not optimised
--- Comment #2 from chris at bubblescope dot net 2009-11-10 08:14 --- Sorry, one important thing I missed off my bug report. This problem seems to just be connected to constant lists. The following is fully optimised away int i = 1, j = 2; return max_val({i,j}); As is the following, despite the fact the code never access the third element of the initializer_list int i = 1; return max_val({1,2,i}); So this really seem to be some (mis)optimisation involving constant lists. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41997
[Bug c++/41997] [C++0x] constant initializer_list not optimised
--- Comment #3 from pinskia at gcc dot gnu dot org 2009-11-10 08:28 --- The decl holding the constant initializer_list is not being marked as read only for some reason. Even the static to constant optimization is not marking it as read only. Tomorrow I will look further into it. To see why the decl is not being marked as such (which causes this missed optimization). -- pinskia at gcc dot gnu dot org changed: What|Removed |Added CC||pinskia at gcc dot gnu dot ||org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2009-11-10 08:28:00 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41997
[Bug c++/41997] [C++0x] constant initializer_list not optimised
--- Comment #1 from paolo dot carlini at oracle dot com 2009-11-09 23:47 --- Let's CC Jason about this... -- paolo dot carlini at oracle dot com changed: What|Removed |Added CC||jason at gcc dot gnu dot org Summary|constant initializer_list |[C++0x] constant |not optimised |initializer_list not ||optimised http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41997