summaryrefslogtreecommitdiff
path: root/gcc/loop-invariant.c
diff options
context:
space:
mode:
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2006-06-08 08:17:05 +0000
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2006-06-08 08:17:05 +0000
commitbd7519f035e6ceedfb511a07a6d450817681ebcc (patch)
tree0e96cb17f5cc87934c7398356043594977cc1ab6 /gcc/loop-invariant.c
parentd328c4ab4881495fcd2f85a8b3b946573b0d8d51 (diff)
downloadgcc-bd7519f035e6ceedfb511a07a6d450817681ebcc.tar.gz
PR rtl-optimization/26449
* loop-invariant.c (move_invariant_reg): Fail if force_operand fails. * gcc.dg/pr26449.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114481 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop-invariant.c')
-rw-r--r--gcc/loop-invariant.c5
1 files changed, 5 insertions, 0 deletions
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 ();