diff options
author | Janus Weil <janus@gcc.gnu.org> | 2008-05-28 23:27:56 +0200 |
---|---|---|
committer | Janus Weil <janus@gcc.gnu.org> | 2008-05-28 23:27:56 +0200 |
commit | e68954309d6a19f6008491b90da7bf0c78b3b6b1 (patch) | |
tree | 222a6e4ef029746c2fd84e3d767c20b3d51f3ba1 /gcc/fortran/symbol.c | |
parent | 691da334bca13d0056d6d6e6f919995c1f1f9e4e (diff) | |
download | gcc-e68954309d6a19f6008491b90da7bf0c78b3b6b1.zip gcc-e68954309d6a19f6008491b90da7bf0c78b3b6b1.tar.gz gcc-e68954309d6a19f6008491b90da7bf0c78b3b6b1.tar.bz2 |
re PR fortran/36325 (specific or generic INTERFACE implies the EXTERNAL attribute)
2008-05-28 Janus Weil <janus@gcc.gnu.org>
PR fortran/36325
PR fortran/35830
* interface.c (gfc_procedure_use): Enable argument checking for
external procedures with explicit interface.
* symbol.c (check_conflict): Fix conflict checking for externals.
(copy_formal_args): Fix handling of arrays.
* resolve.c (resolve_specific_f0, resolve_specific_s0): Fix handling
of intrinsics.
* parse.c (parse_interface): Non-abstract INTERFACE statement implies
EXTERNAL attribute.
2008-05-28 Janus Weil <janus@gcc.gnu.org>
PR fortran/36325
PR fortran/35830
* gfortran.dg/interface_23.f90: New.
* gfortran.dg/gomp/reduction3.f90: Fixed invalid code.
* gfortran.dg/proc_decl_12.f90: New:
* gfortran.dg/external_procedures_1.f90: Fixed error message.
From-SVN: r136130
Diffstat (limited to 'gcc/fortran/symbol.c')
-rw-r--r-- | gcc/fortran/symbol.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c index 431b651..e98a19c 100644 --- a/gcc/fortran/symbol.c +++ b/gcc/fortran/symbol.c @@ -434,12 +434,14 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where) conf (target, external); conf (target, intrinsic); - conf (external, dimension); /* See Fortran 95's R504. */ + + if (!attr->if_source) + conf (external, dimension); /* See Fortran 95's R504. */ conf (external, intrinsic); conf (entry, intrinsic); - if ((attr->if_source && !attr->procedure) || attr->contained) + if ((attr->if_source == IFSRC_DECL && !attr->procedure) || attr->contained) { conf (external, subroutine); conf (external, function); @@ -3664,6 +3666,7 @@ copy_formal_args (gfc_symbol *dest, gfc_symbol *src) /* May need to copy more info for the symbol. */ formal_arg->sym->attr = curr_arg->sym->attr; formal_arg->sym->ts = curr_arg->sym->ts; + formal_arg->sym->as = gfc_copy_array_spec (curr_arg->sym->as); /* If this isn't the first arg, set up the next ptr. For the last arg built, the formal_arg->next will never get set to |