diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-11-25 18:12:29 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-11-25 18:12:29 +0100 |
commit | 27d0862e62b5af5cce218a32cfcf3db27c85d1f2 (patch) | |
tree | 41c0096307a8386d29ee56f9b91319ef9abee866 /gcc/combine.c | |
parent | be40f3cd82bf8a14dbfea17e554774ef2171fdc8 (diff) | |
download | gcc-27d0862e62b5af5cce218a32cfcf3db27c85d1f2.zip gcc-27d0862e62b5af5cce218a32cfcf3db27c85d1f2.tar.gz gcc-27d0862e62b5af5cce218a32cfcf3db27c85d1f2.tar.bz2 |
re PR rtl-optimization/78527 (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))
PR rtl-optimization/78527
* combine.c (make_compound_operation_int): Ignore LSHIFTRT with
out of bounds shift count.
* gcc.c-torture/compile/pr78527.c: New test.
From-SVN: r242879
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index ce6cfde..ecf6741 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -8091,6 +8091,8 @@ make_compound_operation_int (machine_mode mode, rtx *x_ptr, if (GET_CODE (inner) == LSHIFTRT && CONST_INT_P (XEXP (inner, 1)) && GET_MODE_SIZE (mode) < GET_MODE_SIZE (GET_MODE (inner)) + && (UINTVAL (XEXP (inner, 1)) + < GET_MODE_PRECISION (GET_MODE (inner))) && subreg_lowpart_p (x)) { new_rtx = make_compound_operation (XEXP (inner, 0), next_code); |