This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/30023] New: optimize static constructors into initialized data
- From: "zackw at panix dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Nov 2006 23:15:28 -0000
- Subject: [Bug c++/30023] New: optimize static constructors into initialized data
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The attached test case involves a global object with class type and a
constructor that just copies values from its arguments into instance variables.
It would be nice if GCC would recognize this case and generate an
initialized-data object instead of a global constructor invocation. (In this
particular example, the entire object could then go into .rodata; but the
optimization would be beneficial even for objects that can't.)
--
Summary: optimize static constructors into initialized data
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: zackw at panix dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30023