diff options
author | Richard Guenther <rguenther@suse.de> | 2009-05-20 08:19:50 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2009-05-20 08:19:50 +0000 |
commit | 0328ae4d560fdd0e50c48c65660c489e36ab8ca5 (patch) | |
tree | 8e5d1ff8ef8bb98b797191bdea3d8cbef82b2472 /gcc/expr.c | |
parent | a7994a57b9b7f80eb0f3d8ebe40184b963f25c59 (diff) | |
download | gcc-0328ae4d560fdd0e50c48c65660c489e36ab8ca5.zip gcc-0328ae4d560fdd0e50c48c65660c489e36ab8ca5.tar.gz gcc-0328ae4d560fdd0e50c48c65660c489e36ab8ca5.tar.bz2 |
expr.c (expand_expr_real_1): Avoid calling do_store_flag with mismatched comparison modes.
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.
From-SVN: r147731
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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; |