diff options
author | Tobias Burnus <burnus@net-b.de> | 2011-04-28 07:48:18 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2011-04-28 07:48:18 +0200 |
commit | a300121e62712fdafb2b508f8a392cffccf075c8 (patch) | |
tree | 31b49be6d13c3e57672ee9ca8ef933d27ecce92c /gcc/fortran/resolve.c | |
parent | 77a30e9a5f8ffbf06702de86d9b58e075d1ddc71 (diff) | |
download | gcc-a300121e62712fdafb2b508f8a392cffccf075c8.zip gcc-a300121e62712fdafb2b508f8a392cffccf075c8.tar.gz gcc-a300121e62712fdafb2b508f8a392cffccf075c8.tar.bz2 |
re PR fortran/48112 (generic interface to external function in module)
2011-04-28 Tobias Burnus <burnus@net-b.de>
PR fortran/48112
* resolve.c (resolve_fl_var_and_proc): Print diagnostic of
function results only once.
(resolve_symbol): Always resolve function results.
PR fortran/48279
* expr.c (gfc_check_vardef_context): Fix handling of generic
EXPR_FUNCTION.
* interface.c (check_interface0): Reject internal functions
in generic interfaces, unless -std=gnu.
2011-04-28 Tobias Burnus <burnus@net-b.de>
PR fortran/48112
PR fortran/48279
* gfortran.dg/interface_35.f90: New.
* gfortran.dg/erfc_scaled_1.f90: Don't compile with -pedantic.
* gfortran.dg/func_result_6.f90: Add dg-warning.
* gfortran.dg/bessel_1.f90: Ditto.
* gfortran.dg/hypot_1.f90: Ditto.
* gfortran.dg/proc_ptr_comp_20.f90: Ditto.
* gfortran.dg/proc_ptr_comp_21.f90: Ditto.
* gfortran.dg/interface_assignment_4.f90: Ditto.
From-SVN: r173059
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r-- | gcc/fortran/resolve.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 144d308..7fed7a5 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -9886,6 +9886,11 @@ apply_default_init_local (gfc_symbol *sym) static gfc_try resolve_fl_var_and_proc (gfc_symbol *sym, int mp_flag) { + /* Avoid double diagnostics for function result symbols. */ + if ((sym->result || sym->attr.result) && !sym->attr.dummy + && (sym->ns != gfc_current_ns)) + return SUCCESS; + /* Constraints on deferred shape variable. */ if (sym->as == NULL || sym->as->type != AS_DEFERRED) { @@ -11974,11 +11979,6 @@ resolve_symbol (gfc_symbol *sym) gfc_namespace *ns; gfc_component *c; - /* Avoid double resolution of function result symbols. */ - if ((sym->result || sym->attr.result) && !sym->attr.dummy - && (sym->ns != gfc_current_ns)) - return; - if (sym->attr.flavor == FL_UNKNOWN) { |