aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans.h
diff options
context:
space:
mode:
authorTobias Burnus <tobias@codesourcery.com>2020-05-11 16:39:20 +0200
committerTobias Burnus <tobias@codesourcery.com>2020-05-11 16:40:18 +0200
commit892c7427ee234c04852e90d9ce32913a429adf9d (patch)
treefa62cc00f73ebbf6a0380d06175041a35bd3cffb /gcc/fortran/trans.h
parentaa4317866bf3e9f42f3b8e3b1b1ec113ed1f818d (diff)
downloadgcc-892c7427ee234c04852e90d9ce32913a429adf9d.zip
gcc-892c7427ee234c04852e90d9ce32913a429adf9d.tar.gz
gcc-892c7427ee234c04852e90d9ce32913a429adf9d.tar.bz2
[Fortran] Fix/modify present() handling for assumed-shape optional (PR 94672)
gcc/fortran/ 2020-05-07 Tobias Burnus <tobias@codesourcery.com> PR fortran/94672 * trans.h (gfc_conv_expr_present): Add use_saved_decl=false argument. * trans-expr.c (gfc_conv_expr_present): Likewise; use DECL directly and only if use_saved_decl is true, use the actual PARAM_DECL arg (saved descriptor). * trans-array.c (gfc_trans_dummy_array_bias): Set local 'arg.0' variable to NULL if 'arg' is not present. * trans-openmp.c (gfc_omp_check_optional_argument): Simplify by checking 'arg.0' instead of the true PARM_DECL. (gfc_omp_finish_clause): Remove setting 'arg.0' to NULL. gcc/testsuite/ 2020-05-07 Jakub Jelinek <jakub@redhat.com> Tobias Burnus <tobias@codesourcery.com> PR fortran/94672 * gfortran.dg/gomp/pr94672.f90: New. * gfortran.dg/missing_optional_dummy_6a.f90: Update scan-tree.
Diffstat (limited to 'gcc/fortran/trans.h')
-rw-r--r--gcc/fortran/trans.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/trans.h b/gcc/fortran/trans.h
index 69171f3..bd96cdf 100644
--- a/gcc/fortran/trans.h
+++ b/gcc/fortran/trans.h
@@ -561,7 +561,7 @@ void gfc_trans_common (gfc_namespace *);
void gfc_conv_structure (gfc_se *, gfc_expr *, int);
/* Return an expression which determines if a dummy parameter is present. */
-tree gfc_conv_expr_present (gfc_symbol *);
+tree gfc_conv_expr_present (gfc_symbol *, bool use_saved_decl = false);
/* Convert a missing, dummy argument into a null or zero. */
void gfc_conv_missing_dummy (gfc_se *, gfc_expr *, gfc_typespec, int);