Commit cebf212f by Ulrich Weigand Committed by Ulrich Weigand

loop.c (move_movables): Handle combination of m->consec...

ChangeLog:
	* loop.c (move_movables): Handle combination of m->consec,
	m->move_insn_first, and m->insert_temp all nonzero correctly.
testsuite/ChangeLog:
	* gcc.dg/20031216-1.c: New test.

From-SVN: r74778
parent 51287c14
2003-12-18 Ulrich Weigand <uweigand@de.ibm.com>
* loop.c (move_movables): Handle combination of m->consec,
m->move_insn_first, and m->insert_temp all nonzero correctly.
2003-12-18 Kazu Hirata <kazu@cs.umass.edu> 2003-12-18 Kazu Hirata <kazu@cs.umass.edu>
* calls.c (load_register_parameters): Don't use * calls.c (load_register_parameters): Don't use
......
...@@ -2113,7 +2113,8 @@ move_movables (struct loop *loop, struct loop_movables *movables, ...@@ -2113,7 +2113,8 @@ move_movables (struct loop *loop, struct loop_movables *movables,
/* The SET_SRC might not be invariant, so we must /* The SET_SRC might not be invariant, so we must
use the REG_EQUAL note. */ use the REG_EQUAL note. */
start_sequence (); start_sequence ();
emit_move_insn (m->set_dest, m->set_src); emit_move_insn (m->insert_temp ? newreg : m->set_dest,
m->set_src);
seq = get_insns (); seq = get_insns ();
end_sequence (); end_sequence ();
......
2003-12-18 Ulrich Weigand <uweigand@de.ibm.com>
* gcc.dg/20031216-1.c: New test.
2003-12-18 Giovanni Bajo <giovannibajo@gcc.gnu.org> 2003-12-18 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/9154 PR c++/9154
......
/* This used to abort due to a loop bug on s390*. */
/* { dg-do run } */
/* { dg-options "-O2" } */
/* { dg-options "-O2 -fPIC" { target s390*-*-* } } */
int count = 0;
char *str;
void test (int flag)
{
char *p;
for (;;)
{
if (count > 5)
return;
p = "test";
if (flag)
count++;
str = p;
}
}
int main (void)
{
test (1);
if (str[0] != 't')
abort ();
return 0;
}
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