From 54f16bf8f37128b5db6aa35fac9559632885d265 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 7 Apr 2011 19:58:05 +0200 Subject: [PATCH] re PR debug/48343 (ICE compiling i586 linux-2.6.38/drivers/staging/wlan-ng/p80211wep.c: in form_sum, at reload.c:5338) PR debug/48343 * combine.c (combine_instructions): Add last_combined_insn, update it if insn is after it, pass it to all try_combine calls. (try_combine): Add last_combined_insn parameter, pass it instead of i3 to propagate_for_debug. * gcc.dg/torture/pr48343.c: New test. From-SVN: r172109 --- gcc/testsuite/gcc.dg/torture/pr48343.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/torture/pr48343.c diff --git a/gcc/testsuite/gcc.dg/torture/pr48343.c b/gcc/testsuite/gcc.dg/torture/pr48343.c new file mode 100644 index 00000000000..e56b3a3dae3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr48343.c @@ -0,0 +1,19 @@ +/* PR debug/48343 */ +/* { dg-do compile } */ +/* { dg-options "-fcompare-debug" } */ + +void foo (unsigned char *, unsigned char *); + +void +test (unsigned int x, int y) +{ + unsigned int i, j = 0, k; + unsigned char s[256], t[64]; + foo (s, t); + t[0] = y; + for (i = 0; i < 256; i++) + { + j = (j + s[i] + t[i % x]) & 0xff; + k = i; i = j; j = k; + } +} -- 2.30.2