This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch - Issue diagnostic on use of large stack variable - don't ICE
- From: Steven Bosscher <stevenb at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Fariborz Jahanian <fjahanian at apple dot com>, "gcc-patches at gcc dot gnu dot org Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 3 May 2005 00:59:19 +0200
- Subject: Re: patch - Issue diagnostic on use of large stack variable - don't ICE
- References: <6D1D4F31-BB51-11D9-A9CA-000393B9ED88@apple.com>
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