This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/30023] New: optimize static constructors into initialized data


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]