aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ada-tree.h3
-rw-r--r--gcc/ada/trans.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/gcc/ada/ada-tree.h b/gcc/ada/ada-tree.h
index 0bc81e4..608f75e 100644
--- a/gcc/ada/ada-tree.h
+++ b/gcc/ada/ada-tree.h
@@ -36,7 +36,8 @@ enum gnat_tree_code {
/* Ada uses the lang_decl and lang_type fields to hold a tree. */
union lang_tree_node
GTY((desc ("0"),
- chain_next ("(union lang_tree_node *)TREE_CHAIN (&%h.t)")))
+ chain_next ("(GIMPLE_STMT_P (&%h.t) ? (union lang_tree_node *) 0 : (union lang_tree_node *)TREE_CHAIN (&%h.t))")))
+
{
union tree_node GTY((tag ("0"))) t;
};
diff --git a/gcc/ada/trans.c b/gcc/ada/trans.c
index 7b9c260..b19f2f5 100644
--- a/gcc/ada/trans.c
+++ b/gcc/ada/trans.c
@@ -4840,7 +4840,7 @@ gnat_gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p ATTRIBUTE_UNUSED)
&& TREE_CODE_CLASS (TREE_CODE (op)) != tcc_constant)
{
tree new_var = create_tmp_var (TREE_TYPE (op), "A");
- tree mod = build2 (MODIFY_EXPR, TREE_TYPE (op), new_var, op);
+ tree mod = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (op), new_var, op);
TREE_ADDRESSABLE (new_var) = 1;