This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15172] [3.3/3.4 regression] Copy constructor optimization in aggregate initialization
- From: "mmitchel at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Oct 2004 01:58:06 -0000
- Subject: [Bug c++/15172] [3.3/3.4 regression] Copy constructor optimization in aggregate initialization
- References: <20040427165935.15172.michael.spencer@ubs.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-10-31 01:58 -------
The problem here is that expand_expr_real creates a temporary variable and
stores the CONSTRCUTOR corresponding to the brace-enclosed initializer there.
Then, it copies the temporary to the global variable.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15172