[4.5] PATCH: PR c/39323: MAX_OFILE_ALIGNMENT in elfos.h is too big
Ian Lance Taylor
iant@google.com
Tue Mar 3 00:21:00 GMT 2009
"H.J. Lu" <hjl.tools@gmail.com> writes:
> I noticed this issue while working on
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39315
>
> Its fix:
>
> http://gcc.gnu.org/ml/gcc-patches/2009-02/msg01267.html
>
> has been approved for 4.5. Since MAX_OFILE_ALIGNMENT is
> too big on Linux, in theory, expand_one_stack_var_at can overflow
> DECL_ALIGN. In practice, it may never happen. I added a check
>
> + /* There should be no alignment overflow. */
> + if (DECL_ALIGN (decl) != align)
> + gcc_unreachable ();
>
> in expand_one_stack_var_at. OK for 4.5?
User input should never cause gcc to call gcc_unreachable().
It would be fine for 4.5 to call error(), or maybe it would be better to
call sorry().
Ian
More information about the Gcc-patches
mailing list