trans.h: Use fold_build in build1_v, build2_v and build3_v macros.
authorTobias Schlüter <tobi@gcc.gnu.org>
Sun, 23 Mar 2008 09:28:03 +0000 (10:28 +0100)
committerTobias Schlüter <tobi@gcc.gnu.org>
Sun, 23 Mar 2008 09:28:03 +0000 (10:28 +0100)
2008-03-23  Tobias Schlueter  <tobi@gcc.gnu.org>

* trans.h: Use fold_build in build1_v, build2_v and build3_v
macros.
* trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
Don't use build2_v macro.

From-SVN: r133460

gcc/fortran/ChangeLog
gcc/fortran/trans-openmp.c
gcc/fortran/trans.h

index 9254562afaeaa954798f6876a2d7fc3218f8ddaa..1be96641c4ab9828a464a316c102eb6c77dc5bfb 100644 (file)
@@ -1,3 +1,10 @@
+2008-03-23  Tobias Schlüter  <tobi@gcc.gnu.org>
+
+       * trans.h: Use fold_build in build1_v, build2_v and build3_v
+       macros.
+       * trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
+       Don't use build2_v macro.
+
 2008-03-19  Daniel Franke  <franke.daniel@gmail.com>
 
        PR fortran/35152
index d1188a168d431c47f71e2afc894566cb10df5569..c6c4baeca63cfc7d04b28634063697fd4db7611f 100644 (file)
@@ -888,7 +888,7 @@ gfc_trans_omp_critical (gfc_code *code)
   if (code->ext.omp_name != NULL)
     name = get_identifier (code->ext.omp_name);
   stmt = gfc_trans_code (code->block->next);
-  return build2_v (OMP_CRITICAL, stmt, name);
+  return build2 (OMP_CRITICAL, void_type_node, stmt, name);
 }
 
 static tree
@@ -1216,7 +1216,7 @@ gfc_trans_omp_single (gfc_code *code, gfc_omp_clauses *clauses)
 {
   tree omp_clauses = gfc_trans_omp_clauses (NULL, clauses, code->loc);
   tree stmt = gfc_trans_omp_code (code->block->next, true);
-  stmt = build2_v (OMP_SINGLE, stmt, omp_clauses);
+  stmt = build2 (OMP_SINGLE, void_type_node, stmt, omp_clauses);
   return stmt;
 }
 
index eac320a9e018a74be457b4e0e8ef7e63566b9ac1..413433641c175568917c43445a2bb2ca70f4cb50 100644 (file)
@@ -637,11 +637,11 @@ struct lang_decl          GTY(())
   (TYPE_LANG_SPECIFIC(node)->dataptr_type)
 
 /* Build an expression with void type.  */
-#define build1_v(code, arg) build1(code, void_type_node, arg)
-#define build2_v(code, arg1, arg2) build2(code, void_type_node, \
-                                          arg1, arg2)
-#define build3_v(code, arg1, arg2, arg3) build3(code, void_type_node, \
-                                                arg1, arg2, arg3)
+#define build1_v(code, arg) fold_build1(code, void_type_node, arg)
+#define build2_v(code, arg1, arg2) fold_build2(code, void_type_node, \
+                                               arg1, arg2)
+#define build3_v(code, arg1, arg2, arg3) fold_build3(code, void_type_node, \
+                                                     arg1, arg2, arg3)
 #define build4_v(code, arg1, arg2, arg3, arg4) build4(code, void_type_node, \
                                                      arg1, arg2, arg3, arg4)