diff options
author | Thomas Koenig <tkoenig@gcc.gnu.org> | 2019-03-10 09:34:46 +0000 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2019-03-10 09:34:46 +0000 |
commit | 2263c69edc270c1e762c88e771d12dd5d09b052d (patch) | |
tree | 31cddd2643e2e922910fe62e270042ae23b5d3d0 /gcc/fortran/symbol.c | |
parent | c02a57a0bb0238915929b267f275ee3d4832185f (diff) | |
download | gcc-2263c69edc270c1e762c88e771d12dd5d09b052d.zip gcc-2263c69edc270c1e762c88e771d12dd5d09b052d.tar.gz gcc-2263c69edc270c1e762c88e771d12dd5d09b052d.tar.bz2 |
re PR fortran/87734 (ICE in is_illegal_recursion check for character len= parameter)
2019-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/87734
* symbol.c (gfc_add_procedure): Only throw an error if the
procedure has not been declared either PUBLIC or PRIVATE.
2019-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/87734
* gfortran.dg/public_private_module_10.f90: New test.
From-SVN: r269547
Diffstat (limited to 'gcc/fortran/symbol.c')
-rw-r--r-- | gcc/fortran/symbol.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c index 0eb4130..4dfa836 100644 --- a/gcc/fortran/symbol.c +++ b/gcc/fortran/symbol.c @@ -1805,7 +1805,8 @@ gfc_add_procedure (symbol_attribute *attr, procedure_type t, if (where == NULL) where = &gfc_current_locus; - if (attr->proc != PROC_UNKNOWN && !attr->module_procedure) + if (attr->proc != PROC_UNKNOWN && !attr->module_procedure + && attr->access == ACCESS_UNKNOWN) { if (attr->proc == PROC_ST_FUNCTION && t == PROC_INTERNAL && !gfc_notification_std (GFC_STD_F2008)) |