This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix for regression in gcc.c-torture/execute/20011114-1.c
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Corey Minyard <minyard at acm dot org>, gcc-patches at gcc dot gnu dot org
- Date: 02 Dec 2001 15:48:24 -0200
- Subject: Re: Fix for regression in gcc.c-torture/execute/20011114-1.c
- Organization: GCC Team, Red Hat
- References: <3C07DCE0.3070709@acm.org> <20011130135356.J32134@redhat.com><orlmglfs5j.fsf@free.redhat.lsd.ic.unicamp.br>
On Dec 2, 2001, Alexandre Oliva <aoliva@redhat.com> wrote:
> Does it fix c-torture/execute/930603-1.c too?
Never mind. I thought your patch hadn't gone in yet, because
compile/20011114-1.c was failing for me, and execute/930603-1.c is
definitely related. In fact, I think it may have been caused by your
patch :-(
The problem is that the tree inliner crashes because DECL_INITIAL of
the fn tree is NULL. Should DECL_SAVED_TREE be NULL too, we wouldn't
have attempted to inline the function, but we can't copy
DECL_INITIAL.
So, do we want to inline a function defined in global scope if we
encounter an extern declaration of it in function scope, as in the
failing testcase? If we don't care about inlining it,
conditionalizing the copy of DECL_SAVED_TREE, as suggested by Corey,
is exactly the right thing to do. Otherwise, we may have to come up
with some way for the tree inliner to find the DECL_INITIAL of the
original function decl, without getting the nested decl to seem like a
function definition.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me