aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/match.c
diff options
context:
space:
mode:
authorSteven G. Kargl <kargl@gcc.gnu.org>2019-10-02 17:01:30 +0000
committerSteven G. Kargl <kargl@gcc.gnu.org>2019-10-02 17:01:30 +0000
commit8b4e5e711d9b2b979dcee445498a7f570ea49e2e (patch)
tree95139ba5c83855facfea0c6d13b90a158c9bdd6b /gcc/fortran/match.c
parentb1fb82e52520bf9be6dff67bbcd6129ae85bc098 (diff)
downloadgcc-8b4e5e711d9b2b979dcee445498a7f570ea49e2e.zip
gcc-8b4e5e711d9b2b979dcee445498a7f570ea49e2e.tar.gz
gcc-8b4e5e711d9b2b979dcee445498a7f570ea49e2e.tar.bz2
re PR fortran/91943 (ICE in gfc_conv_constant_to_tree, at fortran/trans-const.c:370)
2019-10-02 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/91943 * match.c (gfc_match_call): BOZ cannot be an actual argument in a subroutine reference. * resolve.c (resolve_function): BOZ cannot be an actual argument in a function reference. 2019-10-02 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/91943 gfortran.dg/pr91943.f90 From-SVN: r276471
Diffstat (limited to 'gcc/fortran/match.c')
-rw-r--r--gcc/fortran/match.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c
index 83b1189..4a31080 100644
--- a/gcc/fortran/match.c
+++ b/gcc/fortran/match.c
@@ -4984,6 +4984,16 @@ gfc_match_call (void)
goto syntax;
}
+ /* Walk the argument list looking for invalid BOZ. */
+ for (a = arglist; a; a = a->next)
+ if (a->expr && a->expr->ts.type == BT_BOZ)
+ {
+ gfc_error ("A BOZ literal constant at %L cannot appear as an actual "
+ "argument in a subroutine reference", &a->expr->where);
+ goto cleanup;
+ }
+
+
/* If any alternate return labels were found, construct a SELECT
statement that will jump to the right place. */