Commit 27d0862e by Jakub Jelinek Committed by Jakub Jelinek

re PR rtl-optimization/78527 (ice on valid C code at -O3 in both 32-bit and…

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
parent be40f3cd
2016-11-25 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/78527
* combine.c (make_compound_operation_int): Ignore LSHIFTRT with
out of bounds shift count.
2016-11-25 Martin Liska <mliska@suse.cz> 2016-11-25 Martin Liska <mliska@suse.cz>
PR web/71666 PR web/71666
...@@ -8091,6 +8091,8 @@ make_compound_operation_int (machine_mode mode, rtx *x_ptr, ...@@ -8091,6 +8091,8 @@ make_compound_operation_int (machine_mode mode, rtx *x_ptr,
if (GET_CODE (inner) == LSHIFTRT if (GET_CODE (inner) == LSHIFTRT
&& CONST_INT_P (XEXP (inner, 1)) && CONST_INT_P (XEXP (inner, 1))
&& GET_MODE_SIZE (mode) < GET_MODE_SIZE (GET_MODE (inner)) && GET_MODE_SIZE (mode) < GET_MODE_SIZE (GET_MODE (inner))
&& (UINTVAL (XEXP (inner, 1))
< GET_MODE_PRECISION (GET_MODE (inner)))
&& subreg_lowpart_p (x)) && subreg_lowpart_p (x))
{ {
new_rtx = make_compound_operation (XEXP (inner, 0), next_code); new_rtx = make_compound_operation (XEXP (inner, 0), next_code);
......
2016-11-25 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/78527
* gcc.c-torture/compile/pr78527.c: New test.
2016-11-25 Martin Liska <mliska@suse.cz> 2016-11-25 Martin Liska <mliska@suse.cz>
PR gcov-profile/78086 PR gcov-profile/78086
......
/* PR rtl-optimization/78527 */
unsigned a;
short b, e;
int *c;
char d;
int
main ()
{
int f = 80;
for (;;) {
if (f > 432)
*c = a;
while (b)
if (d)
e = -(a >> f);
c = &f;
b = e;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment