public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/23477] New: default-initializing array new expression uses memcpy() instead of memset(), bloats executable
@ 2005-08-19  9:21 avi at argo dot co dot il
  2005-08-19 11:35 ` [Bug middle-end/23477] [4.1 Regression] default-initializing array new expression uses makes stack usage go way up pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: avi at argo dot co dot il @ 2005-08-19  9:21 UTC (permalink / raw)
  To: gcc-bugs

the program 
 
    int main() 
    { 
        new int[10000000](); 
    } 
 
generates a 40MB executable. it compiles into a memcpy() of 40MB of zeros into 
the newly-allocated array. 
 
tested at -O0 and -O3. 
 
gcc version 4.0.1 20050727 (Red Hat 4.0.1-5)

-- 
           Summary: default-initializing array new expression uses memcpy()
                    instead of memset(), bloats executable
           Product: gcc
           Version: 4.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: avi at argo dot co dot il
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-redhat-linux
  GCC host triplet: i386-redhat-linux
GCC target triplet: i386-redhat-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23477


^ permalink raw reply	[flat|nested] 8+ messages in thread
[parent not found: <bug-23477-10612@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2006-01-20 20:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-19  9:21 [Bug c++/23477] New: default-initializing array new expression uses memcpy() instead of memset(), bloats executable avi at argo dot co dot il
2005-08-19 11:35 ` [Bug middle-end/23477] [4.1 Regression] default-initializing array new expression uses makes stack usage go way up pinskia at gcc dot gnu dot org
2005-08-30 10:44 ` pinskia at gcc dot gnu dot org
2005-08-30 11:53 ` rguenth at gcc dot gnu dot org
2005-08-30 13:31 ` rguenth at gcc dot gnu dot org
2005-08-31 11:22 ` cvs-commit at gcc dot gnu dot org
2005-08-31 11:43 ` rguenth at gcc dot gnu dot org
     [not found] <bug-23477-10612@http.gcc.gnu.org/bugzilla/>
2006-01-20 20:51 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).