------- Comment #1 from bonzini at gnu dot org 2007-12-18 16:58 ------- Prototype untested patch. Produces
movl 12(%esp), %eax imull 4(%esp), %eax ret on the testcase. Index: expr.c =================================================================== --- expr.c (revision 130928) +++ expr.c (working copy) @@ -8642,7 +8642,8 @@ expand_expr_real_1 (tree exp, rtx target } expand_operands (TREE_OPERAND (exp, 0), TREE_OPERAND (exp, 1), subtarget, &op0, &op1, 0); - return REDUCE_BIT_FIELD (expand_mult (mode, op0, op1, target, unsignedp)); + return REDUCE_BIT_FIELD (expand_mult (tmode != VOIDmode ? tmode : mode, + op0, op1, target, unsignedp)); case TRUNC_DIV_EXPR: case FLOOR_DIV_EXPR: -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34522