This is the mail archive of the gcc-bugs@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]

[Bug rtl-optimization/78527] [7 Regression] ice on valid C code at -O3 in both 32-bit and 64-bit modes on x86_64-linux-gnu (internal compiler error: in smallest_mode_for_size, at stor-layout.c:364)


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78527

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
8097                int width = GET_MODE_PRECISION (GET_MODE (inner))
8098                            - INTVAL (XEXP (inner, 1));
8099                if (width > mode_width)
8100                  width = mode_width;
8101                new_rtx = make_extraction (mode, new_rtx, 0, XEXP (inner,
1),
8102                                           width, 1, 0, in_code ==
COMPARE);

x is
(subreg:HI (lshiftrt:SI (mem/c:SI (symbol_ref:DI ("a") [flags 0x2] <var_decl
0x7ffff7ff9e10 a>) [1 a+0 S4 A32])
        (const_int 80 [0x50])) 0)
mode_width is 16, but width is -48.
I'd just guard it for valid shift counts.

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