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]

Re: [RFA] Fix PR 598 and PR 776


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.


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