diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6a44f7d5bc0..237393d8f12 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2006-06-07 Zdenek Dvorak + + PR rtl-optimization/26449 + * loop-invariant.c (move_invariant_reg): Fail if force_operand fails. + 2006-06-07 Andrew MacLeod PR middle-end/27793 diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c index 026af40822c..cf229495015 100644 --- a/gcc/loop-invariant.c +++ b/gcc/loop-invariant.c @@ -1178,6 +1178,11 @@ move_invariant_reg (struct loop *loop, unsigned invno) { start_sequence (); op = force_operand (SET_SRC (set), reg); + if (!op) + { + end_sequence (); + goto fail; + } if (op != reg) emit_move_insn (reg, op); seq = get_insns (); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3e0314552d9..78cbebc233f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2006-06-07 Zdenek Dvorak + + PR rtl-optimization/26449 + * gcc.dg/pr26449.c: New test. + 2006-06-07 Volker Reichelt PR c++/27601 diff --git a/gcc/testsuite/gcc.dg/pr26449.c b/gcc/testsuite/gcc.dg/pr26449.c new file mode 100644 index 00000000000..1a0bdad1111 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr26449.c @@ -0,0 +1,15 @@ +/* { dg-do compile { target i?86-*-* } } */ +/* { dg-options "-O1 -ftree-vectorize -march=pentium4 -std=c99" } */ + +void matmul_i4 (int bbase_yn, int xcount) +{ + int x; + int * restrict dest_y; + const int * abase_n; + + for (x = 0; x < xcount; x++) + { + dest_y[x] += abase_n[x] * bbase_yn; + } +} +