diff options
author | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-07-22 14:22:58 +0000 |
---|---|---|
committer | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-07-22 14:22:58 +0000 |
commit | 07b68c99b9f6c2d3ff0396a97df40cf4aaf4ec3e (patch) | |
tree | 46ec71384d4da8c03d74e1033eca3bb9635fd5e0 /gcc/optabs.c | |
parent | fe0e3c2a0efe63130f3e54e31d6fdbf51cb75b9d (diff) | |
download | gcc-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.c | 5 |
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, |