This is the mail archive of the 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 <> 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

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
Red Hat GCC Developer                  aoliva@{,}
CS PhD student at IC-Unicamp        oliva@{,}
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]