This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH rewrite duplicate_decls to not modify olddecl (fixes gcc/12336)
On Tue, Dec 09, 2003 at 05:11:46PM -0800, Zack Weinberg wrote:
> "Zack Weinberg" <zack@codesourcery.com> writes:
>
> > I don't see any problems with your patch, however, I agree that it is
> > far from obviously safe. I'm going to test it on x86-linux and
> > ia64-hpux tonight, and sparc-solaris2 after that machine finishes
> > doing some other work.
>
> Your patch produces a large number of testsuite failures on any target
> that uses DWARF2 by default. In the C testsuite alone:
>
> 173 internal error: in decl_ultimate_origin, at dwarf2out.c:4384
> 36 internal error: in add_abstract_origin_attribute, at dwarf2out.c:9918
> 6 internal error: in gen_subprogram_die, at dwarf2out.c:10661
>
> c-torture/compile/20001018-1.c and c-torture/compile/20030110-1.c are
> the first two failing test cases in my i386-linux build. I think the
> problem has something to do with encountering two nested-block-scope
> declarations (explicit or implicit) for the same symbol in the same
> function.
>
> Could you please investigate this?
The following is only a guess.
The most likely cause of this is that the dwarf2 writer emits
information for abstract instances. This patch overloads that field to
mean something completely different for C than its normal C++ meaning.
If its use overlaps with the C++ frontend's use, there will be more
problems; if not dwarf2out should be taught when to NOT walk
DECL_ABSTRACT_ORIGIN.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer