------- Comment #2 from rguenth at gcc dot gnu dot org 2009-12-13 15:19 ------- The type is addressable and we're creating the temporary on behalf of early SRA through force_gimple_operand_gsi.
VIEW_CONVERT_EXPR<struct PixelARGB>(SR.9075) it's not necessary to do this gimplification as the stmt is a struct copy before: 2449 if (force_gimple_rhs) 2450 rhs = force_gimple_operand_gsi (gsi, rhs, true, NULL_TREE, 2451 true, GSI_SAME_STMT); 2452 if (gimple_assign_rhs1 (*stmt) != rhs) 2453 { 2454 gimple_assign_set_rhs_from_tree (gsi, rhs); (gdb) call debug_gimple_stmt (*stmt) # .MEM_199 = VDEF <.MEM_91> pixel.argb = D.93455.argb; in fact, why the following looks wrong: if (!useless_type_conversion_p (TREE_TYPE (lhs), TREE_TYPE (rhs))) { rhs = fold_build1_loc (loc, VIEW_CONVERT_EXPR, TREE_TYPE (lhs), rhs); if (!is_gimple_reg (lhs)) force_gimple_rhs = true; it should check for is_gimple_reg_type (TREE_TYPE (lhs)) instead. I'm reducing the testcase and check a patch to that effect. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot |dot org |org Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2009-12-13 15:19:50 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42357