diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-20 08:19:50 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-20 08:19:50 +0000 |
commit | f367b3d45cd131315a8b1777df4fd12e83eae1f3 (patch) | |
tree | 8e5d1ff8ef8bb98b797191bdea3d8cbef82b2472 /gcc/expr.c | |
parent | 90560cad6919f37ede31c8550643c8e50811cefa (diff) | |
download | gcc-f367b3d45cd131315a8b1777df4fd12e83eae1f3.tar.gz |
2009-05-20 Richard Guenther <rguenther@suse.de>
* expr.c (expand_expr_real_1): Avoid calling do_store_flag
with mismatched comparison modes.
* gcc.c-torture/compile/20090518-1.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147731 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index aca8c578c8e..73fde710d80 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -9042,7 +9042,12 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, case LTGT_EXPR: temp = do_store_flag (exp, modifier != EXPAND_STACK_PARM ? target : NULL_RTX, - tmode != VOIDmode ? tmode : mode); + (tmode != VOIDmode + /* do_store_flag does not handle target modes + of a different class than the comparison mode. + Avoid ICEing in convert_move. */ + && GET_MODE_CLASS (tmode) == GET_MODE_CLASS (mode)) + ? tmode : mode); if (temp != 0) return temp; |