Thanks James, Shall I create a new bug report or re-open: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21626 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21478
Etienne. --- James E Wilson <[EMAIL PROTECTED]> wrote: > Etienne Lorrain wrote: > > Investigated again a big increase of size going from GCC-3.4 to 4.x > > (gcc (GCC) 4.0.2 20050811 (prerelease)) on my Gujin-v1.2, quickly way > > to reproduce: > > If you want this fixed, you should file a bug report into our bugzilla > database. > > Here is a quicker way to reproduce the problem. > int > sub (int i) > { > int array[1000000] = { 0 }; > > sub2 (&array[i]); > } > > We are dumping the constructor to memory, and then doing a memcpy, when > it would be much better to just do a memset. > > The culprit is code in expand_expr_real_1, case CONSTRUCTOR, which > checks to see if we have a constructor of all constants, in which case > we force it to the constant pool. Not a good idea if the constructor is > a megabyte in size, and all of the elements are constant zero. I don't > have a handy gcc-3.4.3 build tree, but it is apparently a VECTOR_TYPE > check that prevents this code from triggering there. > -- > Jim Wilson, GNU Tools Support, http://www.specifix.com > ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com