From: Michael Matz Date: Mon, 18 Apr 2011 21:53:08 +0000 (+0000) Subject: expr.c (expand_expr_real_2): Use GET_MODE instead of TYPE_MODE. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7254cb57152a417a648f2217d5f8695e636d7cde;p=gcc.git expr.c (expand_expr_real_2): Use GET_MODE instead of TYPE_MODE. 2011-05-18 Michael Matz Steve Ellcey * expr.c (expand_expr_real_2): Use GET_MODE instead of TYPE_MODE. Co-Authored-By: Steve Ellcey From-SVN: r172673 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8b89c115120..fb7509c2537 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-05-18 Michael Matz + Steve Ellcey + + * expr.c (expand_expr_real_2): Use GET_MODE instead of TYPE_MODE. + 2011-04-18 Dennis, CHENG Renquan * doc/passes.texi: Fill crossref nodes. diff --git a/gcc/expr.c b/gcc/expr.c index 491d2b13e6a..1bafe6a2d04 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -7360,7 +7360,10 @@ expand_expr_real_2 (sepops ops, rtx target, enum machine_mode tmode, else if (CONSTANT_P (op0)) { tree inner_type = TREE_TYPE (treeop0); - enum machine_mode inner_mode = TYPE_MODE (inner_type); + enum machine_mode inner_mode = GET_MODE (op0); + + if (inner_mode == VOIDmode) + inner_mode = TYPE_MODE (inner_type); if (modifier == EXPAND_INITIALIZER) op0 = simplify_gen_subreg (mode, op0, inner_mode,