This is the mail archive of the gcc@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: [tree-ssa] Make check bombs my system onnoncompile/20010425-1.c


On Thu, 2003-09-11 at 05:25, Steven Bosscher wrote:

> After this, my computer hang.  This is completely repeatable for me.
> 
>  Anyone else seeing this, too???
> 
We get into an infinite loop inside c-objc-common.c:expand_deferred_fns.
The array deferred_fns has exactly one entry:

__inline__ void bar(int x)
{
  (void)x;
}

Out of all the tests done in the loop, we match 'if (TREE_PUBLIC
(decl))' which sets 'reconsider' to true.

We then call c_expand_deferred_function() which calls
optimize_inline_calls().  In here we allocate a few varrays and call
expand_calls_inline() which in turn walks the function body calling
expand_call_inline().

On returning from optimize_inline_calls(), we call c_expand_body() ->
c_expand_body_1() -> tree_rest_of_compilation(), which ultimately
returns because errorcount is set (this is a noncompile test).

So, we never set TREE_ASM_WRITTEN on this FUNCTION_DECL which leads to
the infinite loop.

One way of fixing this would be for tree_r_o_c to set TREE_ASM_WRITTEN
when it errorcount is set or for expand_deferred_fns() to bail out when
errorcount is set.

Richard, Jason, which would be the better alternative?  Is there a
third?


Thanks.  Diego.


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