On Wed, 2010-12-15 at 13:57 +0100, Jan Hubicka wrote: > Hi, > the problem is that we special case constructors and avoid random seed on > them on targets that have global ctors. > I think bootstrap with C++ or GO is broken for a while on targets not having > ctor support, but now it broke > on targets with ctor support as a result of my patch renaming some of the > ctors from GLOBAL__I into GLOBAL__sub_I. > The other is no longer special cased and thus get random seed. I am testing > the following patch and will commit > it as obvious if it passes. > Can someone, please, confirm that it fixes the reported bootstrap miscompare? > I don't see it on my setup as everything > gets inlined for me in the testcases pointed out and the functions disappear.
A clean c,c++,go build just successfully passed through. Thanks, Martin > > Index: tree.c > =================================================================== > --- tree.c (revision 167819) > +++ tree.c (working copy) > @@ -8518,8 +8518,12 @@ get_file_function_name (const char *type > p = q = ASTRDUP (first_global_object_name); > /* If the target is handling the constructors/destructors, they > will be local to this file and the name is only necessary for > - debugging purposes. */ > - else if ((type[0] == 'I' || type[0] == 'D') && targetm.have_ctors_dtors) > + debugging purposes. > + We also assign sub_I and sub_D sufixes to constructors called from > + the global static constructors. These are always local. */ > + else if (((type[0] == 'I' || type[0] == 'D') && targetm.have_ctors_dtors) > + || (type[0] == 's' && type[1]=='u' && type[2]=='b' && type[3]=='_' > + && (type[4] == 'I' || type[4] == 'D'))) > { > const char *file = main_input_filename; > if (! file)