On 03/04/14 09:40, Marek Polacek wrote:
This should fix ICE on insane alignment.  Normally, check_user_alignment
detects e.g. alignment 1 << 32, but not 1 << 28.  However, record_align
is in bits, so it's actually 8 * (1 << 28) and that's greater than
INT_MAX.  This patch rejects such code.

In the middle hunk, we should give up when an error occurs, we don't
want to call finalize_type_size in that case -- we'd ICE in there.

Regtested/bootstrapped on x86_64-linux, ok for trunk?

2014-03-04  Marek Polacek  <pola...@redhat.com>

        PR middle-end/60226
        * stor-layout.c (layout_type): Return if alignment of array elements
        is greater than element size.  Error out if requested alignment is too
        large.
cp/
        * class.c (layout_class_type): Error out if requested alignment is too
        large.
testsuite/
        * c-c++-common/pr60226.c: New test.
Is this still applicable after the wide-int changes? I haven't looked closely.

jeff

Reply via email to