This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFA] Fix PR 598 and PR 776
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Subject: Re: [RFA] Fix PR 598 and PR 776
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Date: Sat, 27 Oct 2001 12:43:55 +0100
- Cc: gcc-patches at gcc dot gnu dot org
- References: <10110271132.AA22983@vlsi1.ultra.nyu.edu>
Richard Kenner wrote:-
> Perhaps you might wan to start at the beginning and say what problem
> you're trying to solve.
Well, I thought my first mail was quite clear about that. We abort
on stuff like
void foo ()
{
int a[540000000];
}
since, when it comes round to allocating stack space,
assign_stack_temp() calls int_size_for_type() to get the number of
bytes to allocate. It returns -1 because the size is too big.
assign_stack_temp() then passes it on to assign_stack_temp_for_type(),
which assumes that -1 means a variable-sized object, which is an ICE,
and aborts.
But -1 also means overflow as I mentioned above. So I'm just trying to
catch that condition in a_s_t() before passing it on to a_s_t_f_t().
I believe my 2nd patch does that correctly. If you don't agree,
please point out what is wrong with it, and how this bug should be
fixed properly.
Neil.