[Bug c++/41997] [C++0x] constant initializer_list not optimised
chris at bubblescope dot net
gcc-bugzilla@gcc.gnu.org
Tue Nov 10 08:14:00 GMT 2009
------- 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
More information about the Gcc-bugs
mailing list