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: Fix for regression in gcc.c-torture/execute/20011114-1.c


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


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