summaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-05-15 04:56:06 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-05-15 04:56:06 +0000
commit8da637123e80be2156e84d0f2f1be564132996c1 (patch)
tree3ff18ff7fc94a7ca0a414c165e33d5a33108b3f3 /gcc/gimplify.c
parent8eafe656d06910682748b4f19ea12cd8bbabd4ba (diff)
downloadgcc-8da637123e80be2156e84d0f2f1be564132996c1.tar.gz
2009-05-15 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r147550 2009-05-15 Basile Starynkevitch <basile@starynkevitch.net> merged with trunk rev147539 * gcc/melt/warmelt-normal.melt (normexp_defcmatcher): use obj_hash instead of hashcode! * gcc/Makefile.in: TEXI_GCCINT_FILES has both plugins.texi & melt.texi git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@147552 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 0c33dab479a..bff7cdd4b6f 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -3643,14 +3643,11 @@ static enum gimplify_status
gimplify_init_constructor (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
bool want_value, bool notify_temp_creation)
{
- tree object, new_ctor;
- tree ctor = TREE_OPERAND (*expr_p, 1);
- tree type = TREE_TYPE (ctor);
+ tree object, ctor, type;
enum gimplify_status ret;
VEC(constructor_elt,gc) *elts;
- if (TREE_CODE (ctor) != CONSTRUCTOR)
- return GS_UNHANDLED;
+ gcc_assert (TREE_CODE (TREE_OPERAND (*expr_p, 1)) == CONSTRUCTOR);
if (!notify_temp_creation)
{
@@ -3661,8 +3658,10 @@ gimplify_init_constructor (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
}
object = TREE_OPERAND (*expr_p, 0);
- new_ctor = optimize_compound_literals_in_ctor (ctor);
- elts = CONSTRUCTOR_ELTS (new_ctor);
+ ctor = TREE_OPERAND (*expr_p, 1) =
+ optimize_compound_literals_in_ctor (TREE_OPERAND (*expr_p, 1));
+ type = TREE_TYPE (ctor);
+ elts = CONSTRUCTOR_ELTS (ctor);
ret = GS_ALL_DONE;
switch (TREE_CODE (type))