This is the mail archive of the gcc-patches@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]

Re: [C++ Patch]Re: [Bug optimization/11421] [3.4 regression] vtables are not emitted in unit-at-a-time mode


> > > 
> > >>--- 1635,1641 ----
> > >>  {
> > >>    tree vtbl;
> > >>    tree primary_vtbl;
> > >>+   bool needed;
> > > 
> > > 
> > > Shouldn't this be initialized to false?
> > >   
> > > 
> > >>--- 1663,1671 ----
> > >>  	note_debug_info_needed (ctype);
> > >>        return false;
> > >>      }
> > >>+   else if (TREE_PUBLIC (vtbl) && !DECL_COMDAT (vtbl))
> > >>+     needed = 1;
> > >>+
> > > 
> > > 
> > > And this should probably be true instead of 1...
> > 
> > Jan's patch with your corrections does the trick, and my code compiles
> > again. Thanks very much!
> > 
> Thanks for spotting it.  Bit too much hurry :*(
> I noticed it while bootstrapping the patch too, here is updated one that
> bootstraps and regtests fully.
> 
> Mon Jul  7 23:34:24 CEST 2003  Jan Hubicka  <jh@suse.cz>
> 	* decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
> 	unit-at-a-time

Hi,
since this problems affects quite a lot of C++ programs compiled with
-O3 (SPEC2000 EON for instance), I've commited the patch as obvious.  We
may try to find better sollution later.

Honza


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