diff options
| author | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-02-28 15:42:21 +0000 |
|---|---|---|
| committer | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-02-28 15:42:21 +0000 |
| commit | 36efa756238ed7e8e145614ee8519eed0249c738 (patch) | |
| tree | a13a53820b1a4fc0ec96de75d9fa6c175f09961a /gcc/fortran/resolve.c | |
| parent | b9584939b8918ac6d2cad0784417a5c9249722d5 (diff) | |
| download | ppe42-gcc-36efa756238ed7e8e145614ee8519eed0249c738.tar.gz ppe42-gcc-36efa756238ed7e8e145614ee8519eed0249c738.zip | |
PR fortran/34868
* trans-expr.c (gfc_conv_variable): Don't build indirect
references when explicit interface is mandated.
* resolve.c (resolve_formal_arglist): Set attr.always_explicit
on the result symbol as well as the procedure symbol.
* gfortran.dg/f2c_9.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132751 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/resolve.c')
| -rw-r--r-- | gcc/fortran/resolve.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 3df9791c876..ead60f240af 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -106,7 +106,10 @@ resolve_formal_arglist (gfc_symbol *proc) if (gfc_elemental (proc) || sym->attr.pointer || sym->attr.allocatable || (sym->as && sym->as->rank > 0)) - proc->attr.always_explicit = 1; + { + proc->attr.always_explicit = 1; + sym->attr.always_explicit = 1; + } formal_arg_flag = 1; @@ -187,7 +190,11 @@ resolve_formal_arglist (gfc_symbol *proc) if ((sym->as && sym->as->rank > 0 && sym->as->type == AS_ASSUMED_SHAPE) || sym->attr.pointer || sym->attr.allocatable || sym->attr.target || sym->attr.optional) - proc->attr.always_explicit = 1; + { + proc->attr.always_explicit = 1; + if (proc->result) + proc->result->attr.always_explicit = 1; + } /* If the flavor is unknown at this point, it has to be a variable. A procedure specification would have already set the type. */ |

