summaryrefslogtreecommitdiff
path: root/gcc/optabs.c
diff options
context:
space:
mode:
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2002-07-22 14:22:58 +0000
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2002-07-22 14:22:58 +0000
commit07b68c99b9f6c2d3ff0396a97df40cf4aaf4ec3e (patch)
tree46ec71384d4da8c03d74e1033eca3bb9635fd5e0 /gcc/optabs.c
parentfe0e3c2a0efe63130f3e54e31d6fdbf51cb75b9d (diff)
downloadgcc-07b68c99b9f6c2d3ff0396a97df40cf4aaf4ec3e.tar.gz
* 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
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r--gcc/optabs.c5
1 files changed, 4 insertions, 1 deletions
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,