diff options
author | Steven G. Kargl <kargl@gcc.gnu.org> | 2019-08-17 14:27:07 +0000 |
---|---|---|
committer | Steven G. Kargl <kargl@gcc.gnu.org> | 2019-08-17 14:27:07 +0000 |
commit | 1c3925e32aea0046e01f844f2519c47caa7aa63b (patch) | |
tree | 343613919d05f3edd5f09529f42cf469b64aa7f5 /gcc/fortran/decl.c | |
parent | 4f81c2a3c54d8ea9ebd7c703eef9f6d09088eb29 (diff) | |
download | gcc-1c3925e32aea0046e01f844f2519c47caa7aa63b.zip gcc-1c3925e32aea0046e01f844f2519c47caa7aa63b.tar.gz gcc-1c3925e32aea0046e01f844f2519c47caa7aa63b.tar.bz2 |
re PR fortran/78719 ([F03] ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1438)
2019-08-17 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/78719
* decl.c (get_proc_name): Check for a CLASS entity when trying to
add attributes to an entity that already has an explicit interface.
2019-08-17 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/78719
* gfortran.dg/pr78719_1.f90: New test.
* gfortran.dg/pr78719_2.f90: Ditto.
* gfortran.dg/pr78719_3.f90: Ditto.
From-SVN: r274604
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r-- | gcc/fortran/decl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 436dd10..5f12fe1 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -1363,9 +1363,9 @@ get_proc_name (const char *name, gfc_symbol **result, bool module_fcn_entry) } /* Trap declarations of attributes in encompassing scope. The - signature for this is that ts.kind is set. Legitimate - references only set ts.type. */ - if (sym->ts.kind != 0 + signature for this is that ts.kind is nonzero for no-CLASS + entity. For a CLASS entity, ts.kind is zero. */ + if ((sym->ts.kind != 0 || sym->ts.type == BT_CLASS) && !sym->attr.implicit_type && sym->attr.proc == 0 && gfc_current_ns->parent != NULL |