This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ Patch]Re: [Bug optimization/11421] [3.4 regression] vtables are not emitted in unit-at-a-time mode
- From: Jan Hubicka <jh at suse dot cz>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: martin at mpa-garching dot mpg dot de <gcc-bugzilla at gcc dot gnu dot org>,gcc-patches at gcc dot gnu dot org, mark at codesourcery dot com
- Date: Wed, 9 Jul 2003 02:38:48 +0200
- Subject: Re: [C++ Patch]Re: [Bug optimization/11421] [3.4 regression] vtables are not emitted in unit-at-a-time mode
- References: <20030703085958.11421.martin@mpa-garching.mpg.de> <20030708094937.5075.qmail@sources.redhat.com> <20030708132706.GB10103@kam.mff.cuni.cz>
> > >
> > >>--- 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