------- Comment #1 from rguenth at gcc dot gnu dot org 2008-10-16 09:24 ------- A solution would be to wrap the placement in a SAVE_EXPR in all callers of avoid_placement_new_aliasing, thus the following seems to fix it:
Index: init.c =================================================================== *** init.c (revision 141164) --- init.c (working copy) *************** build_new_1 (tree placement, tree type, *** 2041,2046 **** --- 2041,2047 ---- || VOID_TYPE_P (TREE_TYPE (TREE_TYPE (placement_arg)))) { placement_expr = get_target_expr (TREE_VALUE (placement)); + placement_expr = save_expr (placement_expr); CALL_EXPR_ARG (alloc_call, 1) = convert (TREE_TYPE (placement_arg), placement_expr); } -- 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 |2008-10-16 09:24:15 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37847