From 07b68c99b9f6c2d3ff0396a97df40cf4aaf4ec3e Mon Sep 17 00:00:00 2001 From: amylaar Date: Mon, 22 Jul 2002 14:22:58 +0000 Subject: * optabs.c (expand_vector_unop): Don't expand using sub_optab if we got the wrong mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55648 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/optabs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc/optabs.c') diff --git a/gcc/optabs.c b/gcc/optabs.c index dcb4df5f04b..c2f9863ceb6 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -2049,7 +2049,10 @@ expand_vector_unop (mode, unoptab, op0, target, unsignedp) submode = tmode; } /* If there is no negate operation, try doing a subtract from zero. */ - if (unoptab == neg_optab && GET_MODE_CLASS (submode) == MODE_INT) + if (unoptab == neg_optab && GET_MODE_CLASS (submode) == MODE_INT + /* Avoid infinite recursion when an + error has left us with the wrong mode. */ + && GET_MODE (op0) == mode) { rtx temp; temp = expand_binop (mode, sub_optab, CONST0_RTX (mode), op0, -- cgit v1.2.1