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]
Other format: [Raw text]

Re: patch - Issue diagnostic on use of large stack variable - don't ICE


On Monday 02 May 2005 23:30, Fariborz Jahanian wrote:
> *************** expand_one_var (tree var, bool toplevel)
> *** 669,674 ****
> --- 669,679 ----
>       expand_one_hard_reg_var (var);
>     else if (use_register_for_decl (var))
>       expand_one_register_var (var);
> +   else if (! host_integerp (DECL_SIZE_UNIT (var), 1))
> +     {
> +       error ("%Jsize of variable %qD is too large", var, var);
> +       expand_one_error_var (var);
> +     }
>     else if (defer_stack_allocation (var, toplevel))
>       add_stack_var (var);
>     else

We should never be issuing normal errors from here (except for things
like reloading asms, etc.).  It should be a sorry(), because it's just
something GCC does not support.

(I wonder what expand_one_error_var is for anyway, we should never
even get here if there are errors IIUC.)

Gr.
Steven


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