| Submitter | Richard Guenther |
|---|---|
| Date | May 22, 2012, 2:12 p.m. |
| Message ID | <CAFiYyc3HpkaR+j-PiH+RNJ9Ava86Vf2eyu0GZ5VKrRK0Kz1Thg@mail.gmail.com> |
| Download | mbox | patch |
| Permalink | /patch/160646/ |
| State | New |
| Headers | show |
Comments
On 05/22/12 15:12, Richard Guenther wrote: thanks! > But I wonder why CONSTRUCTORs do not inherit TREE_SIDE_EFFECTS > properly ... yeah, that would seem to be the error. Looking ...
Patch
Index: gcc/gimplify.c =================================================================== --- gcc/gimplify.c (revision 187772) +++ gcc/gimplify.c (working copy) @@ -514,7 +514,8 @@ lookup_tmp_var (tree val, bool is_formal block, which means it will go into memory, causing much extra work in reload and final and poorer code generation, outweighing the extra memory allocation here. */ - if (!optimize || !is_formal || TREE_SIDE_EFFECTS (val)) + if (!optimize || !is_formal || TREE_SIDE_EFFECTS (val) + || TREE_CODE (val) == CONSTRUCTOR) ret = create_tmp_from_val (val); else {