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++/23780] New: Suboptimal initialisation of array of class with do-nothing constructor


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


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