aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/gfortran.h
diff options
context:
space:
mode:
authorHarald Anlauf <anlauf@gmx.de>2021-12-02 22:33:49 +0100
committerHarald Anlauf <anlauf@gmx.de>2021-12-03 21:07:55 +0100
commitf46d32dd29b7623915e31b0508e2e925526fa7d8 (patch)
treec4b1148f1ca7351c74dd2fa8e00262ad61f6925d /gcc/fortran/gfortran.h
parentabd7712f91c99690f8b0046ea168b2782afbac69 (diff)
downloadgcc-f46d32dd29b7623915e31b0508e2e925526fa7d8.zip
gcc-f46d32dd29b7623915e31b0508e2e925526fa7d8.tar.gz
gcc-f46d32dd29b7623915e31b0508e2e925526fa7d8.tar.bz2
Fortran: improve checking of array specifications
gcc/fortran/ChangeLog: PR fortran/103505 * array.c (match_array_element_spec): Try to simplify array element specifications to improve early checking. * expr.c (gfc_try_simplify_expr): New. Try simplification of an expression via gfc_simplify_expr. When an error occurs, roll back. * gfortran.h (gfc_try_simplify_expr): Declare it. gcc/testsuite/ChangeLog: PR fortran/103505 * gfortran.dg/pr103505.f90: New test. Co-authored-by: Steven G. Kargl <kargl@gcc.gnu.org>
Diffstat (limited to 'gcc/fortran/gfortran.h')
-rw-r--r--gcc/fortran/gfortran.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h
index 1846ee4..24ad3ed 100644
--- a/gcc/fortran/gfortran.h
+++ b/gcc/fortran/gfortran.h
@@ -3585,6 +3585,7 @@ void gfc_free_ref_list (gfc_ref *);
void gfc_type_convert_binary (gfc_expr *, int);
bool gfc_is_constant_expr (gfc_expr *);
bool gfc_simplify_expr (gfc_expr *, int);
+bool gfc_try_simplify_expr (gfc_expr *, int);
int gfc_has_vector_index (gfc_expr *);
gfc_expr *gfc_get_expr (void);