This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/23780] New: Suboptimal initialisation of array of class with do-nothing constructor
- From: "timb at bluearc dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Sep 2005 12:11:09 -0000
- Subject: [Bug c++/23780] New: Suboptimal initialisation of array of class with do-nothing constructor
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Compile with -O3 :
struct X { int i; X(){} };
void f() { X x[1024]; }
gcc inlines the constructor, but fails to eliminate the now empty loop.
Observed in all the versions and targets I have easily to hand (2.95, 3.[234],
4.0; x86, x86_64, powerpc, sparc).
--
Summary: Suboptimal initialisation of array of class with do-
nothing constructor
Product: gcc
Version: 3.3.6
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: timb at bluearc dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i486-linux-gnu
GCC host triplet: i486-linux-gnu
GCC target triplet: i486-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23780