This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

CFT: tuple changes for ADA


Here are the changes for ada.  The changes are straightforward, as ada
just builds generic which we already handle.

I don't have an ada installation, so I can't test.  Could someone please test
these changes... if not, it'll wait till I'm done fixing java and fortran and I
can figure out how to build ada :).

I have committed the patch to the branch to make it easier for whoever
wants/can test this.

        * ada/ada-tree.h (lang_tree_node): Handle gimple tuples.
        * ada/trans.c (gnat_gimplify_expr): Replace MODIFY_EXPR with
        GIMPLE_MODIFY_STMT.

Index: ada/ada-tree.h
===================================================================
--- ada/ada-tree.h	(revision 118179)
+++ ada/ada-tree.h	(working copy)
@@ -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;
 };
Index: ada/trans.c
===================================================================
--- ada/trans.c	(revision 118382)
+++ ada/trans.c	(working copy)
@@ -4720,7 +4720,7 @@ gnat_gimplify_expr (tree *expr_p, tree *
 	       && 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;
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]