This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Make check bombs my system onnoncompile/20010425-1.c
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Steven Bosscher <s dot bosscher at student dot tudelft dot nl>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>, Richard Henderson <rth at redhat dot com>
- Date: Thu, 11 Sep 2003 12:20:05 -0400
- Subject: Re: [tree-ssa] Make check bombs my system onnoncompile/20010425-1.c
- Organization: Red Hat Canada
- References: <1063272347.3629.5.camel@steven.lr-s.tudelft.nl>
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.