From 47056774217f18dee4804250e5ec5b1e140fcc73 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tobias=20Schl=C3=BCter?= Date: Sun, 23 Mar 2008 10:28:03 +0100 Subject: [PATCH] trans.h: Use fold_build in build1_v, build2_v and build3_v macros. 2008-03-23 Tobias Schlueter * 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 | 7 +++++++ gcc/fortran/trans-openmp.c | 4 ++-- gcc/fortran/trans.h | 10 +++++----- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 9254562afae..1be96641c4a 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2008-03-23 Tobias Schlüter + + * 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 PR fortran/35152 diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c index d1188a168d4..c6c4baeca63 100644 --- a/gcc/fortran/trans-openmp.c +++ b/gcc/fortran/trans-openmp.c @@ -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; } diff --git a/gcc/fortran/trans.h b/gcc/fortran/trans.h index eac320a9e01..413433641c1 100644 --- a/gcc/fortran/trans.h +++ b/gcc/fortran/trans.h @@ -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) -- 2.30.2