diff options
author | janus <janus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-22 09:05:58 +0000 |
---|---|---|
committer | janus <janus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-22 09:05:58 +0000 |
commit | 180a5dc0df968ab1ce2f1b97a15ad6e25d03fff9 (patch) | |
tree | 886c827bd40b9679a6e3588aab4c3edd2e1c2322 /gcc/fortran/decl.c | |
parent | adb906e2e68af10c0e068dd3bcf4f8864e6b416c (diff) | |
download | gcc-180a5dc0df968ab1ce2f1b97a15ad6e25d03fff9.tar.gz |
2009-04-22 Janus Weil <janus@gcc.gnu.org>
PR fortran/39735
* decl.c (add_hidden_procptr_result): Bugfix for procptr results.
(match_procedure_decl): Set if_source.
* expr.c (gfc_check_pointer_assign): Bugfix: Return after error.
And: Check interface also for IFSRC_UNKNOWN (return type may be known).
* gfortran.h (typedef enum ifsrc): Remove IFSRC_USAGE,
add documentation. Rename copy_formal_args and copy_formal_args_intr.
* interface.c (gfc_compare_interfaces): Check for return types,
handle IFSRC_UNKNOWN.
(compare_intr_interfaces,compare_actual_formal_intr): Obsolete, removed.
(gfc_procedure_use): Modified handling of intrinsics.
* intrinsic.c (add_functions): Bugfix for "dim".
* resolve.c (resolve_intrinsic): New function to resolve intrinsics,
which copies the interface from isym to sym.
(resolve_procedure_expression,resolve_function): Use new function
'resolve_intrinsic'.
(resolve_symbol): Add function attribute for externals with return type
and use new function 'resolve_intrinsic'.
* symbol.c (ifsrc_types): Remove string for IFSRC_USAGE.
(copy_formal_args): Renamed to gfc_copy_formal_args.
(copy_formal_args_intr): Renamed to gfc_copy_formal_args_intr.
* trans-const.c (gfc_conv_const_charlen): Handle cl==NULL.
2009-04-22 Janus Weil <janus@gcc.gnu.org>
PR fortran/39735
* gfortran.dg/assumed_charlen_function_5.f90: Modified.
* gfortran.dg/external_initializer.f90: Modified.
* gfortran.dg/interface_26.f90: Modified.
* gfortran.dg/intrinsic_subroutine.f90: Modified.
* gfortran.dg/proc_ptr_3.f90: Modified.
* gfortran.dg/proc_ptr_15.f90: New.
* gfortran.dg/proc_ptr_result_1.f90: Modified.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146554 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r-- | gcc/fortran/decl.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 27fe8ff18fd..b99989ffeb8 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -4104,9 +4104,14 @@ add_hidden_procptr_result (gfc_symbol *sym) { gfc_symtree *stree; if (case1) - gfc_get_sym_tree ("ppr@", gfc_current_ns, &stree); + gfc_get_sym_tree ("ppr@", gfc_current_ns, &stree); else if (case2) - gfc_get_sym_tree ("ppr@", gfc_current_ns->parent, &stree); + { + gfc_symtree *st2; + gfc_get_sym_tree ("ppr@", gfc_current_ns->parent, &stree); + st2 = gfc_new_symtree (&gfc_current_ns->sym_root, "ppr@"); + st2->n.sym = stree->n.sym; + } sym->result = stree->n.sym; sym->result->attr.proc_pointer = sym->attr.proc_pointer; @@ -4291,6 +4296,7 @@ got_ts: } sym->ts.interface = proc_if; sym->attr.untyped = 1; + sym->attr.if_source = IFSRC_IFBODY; } else if (current_ts.type != BT_UNKNOWN) { @@ -4300,6 +4306,7 @@ got_ts: sym->ts.interface->ts = current_ts; sym->ts.interface->attr.function = 1; sym->attr.function = sym->ts.interface->attr.function; + sym->attr.if_source = IFSRC_UNKNOWN; } if (gfc_match (" =>") == MATCH_YES) |