summaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog17
-rw-r--r--gcc/cp/cp-gimplify.c14
-rw-r--r--gcc/cp/cp-tree.h4
3 files changed, 26 insertions, 9 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 31c87e20af8..8c57d4fffa3 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,20 @@
+2006-12-05 Aldy Hernandez <aldyh@redhat.com>
+
+ Merge from gimple-tuples-branch.
+
+ 2006-10-05 Aldy Hernandez <aldyh@redhat.com>
+
+ * cp-gimplify.c (cp_gimplify_expr): Adjust for GIMPLE_MODIFY_STMT.
+ (cxx_omp_clause_apply_fn): Adjust for GIMPLE_MODIFY_STMT.
+ (cxx_omp_clause_copy_ctor): Same.
+ (cxx_omp_clause_assign_op): Same.
+
+ 2006-09-28 Aldy Hernandez <aldyh@redhat.com>
+
+ * cp-tree.h (union lang_tree_node): Gimple statements do not
+ have a TREE_CHAIN.
+ (TREE_INDIRECT_USING): Look in base.
+
2006-12-04 Jan Hubicka <jh@suse.cz>
* cp-objcp-common.c (cp_expr_size): Return NULL in the case
diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c
index bdb2edf2f41..b6ca617ab30 100644
--- a/gcc/cp/cp-gimplify.c
+++ b/gcc/cp/cp-gimplify.c
@@ -483,7 +483,7 @@ cp_gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p)
ret = GS_OK;
break;
- /* We used to do this for MODIFY_EXPR as well, but that's unsafe; the
+ /* We used to do this for GIMPLE_MODIFY_STMT as well, but that's unsafe; the
LHS of an assignment might also be involved in the RHS, as in bug
25979. */
case INIT_EXPR:
@@ -784,13 +784,13 @@ cxx_omp_clause_apply_fn (tree fn, tree arg1, tree arg2)
end1 = build2 (PLUS_EXPR, TREE_TYPE (start1), start1, end1);
p1 = create_tmp_var (TREE_TYPE (start1), NULL);
- t = build2 (MODIFY_EXPR, void_type_node, p1, start1);
+ t = build2 (GIMPLE_MODIFY_STMT, void_type_node, p1, start1);
append_to_statement_list (t, &ret);
if (arg2)
{
p2 = create_tmp_var (TREE_TYPE (start2), NULL);
- t = build2 (MODIFY_EXPR, void_type_node, p2, start2);
+ t = build2 (GIMPLE_MODIFY_STMT, void_type_node, p2, start2);
append_to_statement_list (t, &ret);
}
@@ -812,14 +812,14 @@ cxx_omp_clause_apply_fn (tree fn, tree arg1, tree arg2)
t = fold_convert (TREE_TYPE (p1), TYPE_SIZE_UNIT (inner_type));
t = build2 (PLUS_EXPR, TREE_TYPE (p1), p1, t);
- t = build2 (MODIFY_EXPR, void_type_node, p1, t);
+ t = build2 (GIMPLE_MODIFY_STMT, void_type_node, p1, t);
append_to_statement_list (t, &ret);
if (arg2)
{
t = fold_convert (TREE_TYPE (p2), TYPE_SIZE_UNIT (inner_type));
t = build2 (PLUS_EXPR, TREE_TYPE (p2), p2, t);
- t = build2 (MODIFY_EXPR, void_type_node, p2, t);
+ t = build2 (GIMPLE_MODIFY_STMT, void_type_node, p2, t);
append_to_statement_list (t, &ret);
}
@@ -870,7 +870,7 @@ cxx_omp_clause_copy_ctor (tree clause, tree dst, tree src)
if (info)
ret = cxx_omp_clause_apply_fn (TREE_VEC_ELT (info, 0), dst, src);
if (ret == NULL)
- ret = build2 (MODIFY_EXPR, void_type_node, dst, src);
+ ret = build2 (GIMPLE_MODIFY_STMT, void_type_node, dst, src);
return ret;
}
@@ -886,7 +886,7 @@ cxx_omp_clause_assign_op (tree clause, tree dst, tree src)
if (info)
ret = cxx_omp_clause_apply_fn (TREE_VEC_ELT (info, 2), dst, src);
if (ret == NULL)
- ret = build2 (MODIFY_EXPR, void_type_node, dst, src);
+ ret = build2 (GIMPLE_MODIFY_STMT, void_type_node, dst, src);
return ret;
}
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 0270eb3a6c2..ae250bfbdfe 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -486,7 +486,7 @@ enum cp_tree_node_structure_enum {
/* The resulting tree type. */
union lang_tree_node GTY((desc ("cp_tree_node_structure (&%h)"),
- chain_next ("(union lang_tree_node *)TREE_CHAIN (&%h.generic)")))
+ chain_next ("(GIMPLE_STMT_P (&%h.generic) ? (union lang_tree_node *) 0 : (union lang_tree_node *)TREE_CHAIN (&%h.generic))")))
{
union tree_node GTY ((tag ("TS_CP_GENERIC"),
desc ("tree_node_structure (&%h)"))) generic;
@@ -2067,7 +2067,7 @@ struct lang_decl GTY(())
/* In a TREE_LIST concatenating using directives, indicate indirect
directives */
-#define TREE_INDIRECT_USING(NODE) (TREE_LIST_CHECK (NODE)->common.lang_flag_0)
+#define TREE_INDIRECT_USING(NODE) (TREE_LIST_CHECK (NODE)->base.lang_flag_0)
extern tree decl_shadowed_for_var_lookup (tree);
extern void decl_shadowed_for_var_insert (tree, tree);