diff options
author | Jakub Jelinek <jakub@redhat.com> | 2009-06-16 15:48:07 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2009-06-16 15:48:07 +0200 |
commit | f2ff88729a86a0db86cc6a6ea98d3d5ebfeaa231 (patch) | |
tree | e5f094d6ded3ba769f2acf1025a682d282eae0b7 /gcc/expr.c | |
parent | 345f9a8b8e036b4d17232da2e816e87176e18b49 (diff) | |
download | gcc-f2ff88729a86a0db86cc6a6ea98d3d5ebfeaa231.zip gcc-f2ff88729a86a0db86cc6a6ea98d3d5ebfeaa231.tar.gz gcc-f2ff88729a86a0db86cc6a6ea98d3d5ebfeaa231.tar.bz2 |
re PR middle-end/40446 (ICE in gen_lowpart_general)
PR middle-end/40446
* expr.c (expand_expr_real_1) <case VIEW_CONVERT_EXPR>: Don't
use gen_lowpart if op0 has complex mode.
* g++.dg/other/pr40446.C: New test.
From-SVN: r148533
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -8321,7 +8321,8 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, /* If neither mode is BLKmode, and both modes are the same size then we can use gen_lowpart. */ else if (mode != BLKmode && GET_MODE (op0) != BLKmode - && GET_MODE_SIZE (mode) == GET_MODE_SIZE (GET_MODE (op0))) + && GET_MODE_SIZE (mode) == GET_MODE_SIZE (GET_MODE (op0)) + && !COMPLEX_MODE_P (GET_MODE (op0))) { if (GET_CODE (op0) == SUBREG) op0 = force_reg (GET_MODE (op0), op0); |