------- Comment #7 from janus at gcc dot gnu dot org 2009-04-09 09:39 ------- Subject: Bug 36704
Author: janus Date: Thu Apr 9 09:39:09 2009 New Revision: 145815 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145815 Log: 2009-04-09 Janus Weil <ja...@gcc.gnu.org> PR fortran/36704 * decl.c (add_hidden_procptr_result): New function for handling procedure pointer return values by adding a hidden result variable. (variable_decl,match_procedure_decl,gfc_match_function_decl, gfc_match_subroutine,gfc_match_end,attr_decl1): Handle procedure pointer return values. * parse.c (parse_interface): Add EXTERNAL attribute only after FUNCTION/SUBROUTINE declaration is complete. * primary.c (replace_hidden_procptr_result): New function for replacing function symbol by hidden result variable. (gfc_match_rvalue,match_variable): Replace symbol by hidden result variable. * resolve.c (resolve_contained_fntype,resolve_function,resolve_variable, resolve_symbol): Allow for procedure pointer function results. (resolve_fl_procedure): Conflict detection moved here from 'check_conflict'. * symbol.c (gfc_check_function_type): Allow for procedure pointer function results. (check_conflict): Move some conflict detection to resolution stage. * trans-types.c (gfc_sym_type,gfc_get_function_type): Handle hidden result variables. 2009-04-09 Janus Weil <ja...@gcc.gnu.org> PR fortran/36704 * gfortran.dg/external_procedures_1.f90: Modified. * gfortran.dg/proc_ptr_result_1.f90: New. * gfortran.dg/proc_ptr_result_2.f90: New. * gfortran.dg/proc_ptr_result_3.f90: New. Added: trunk/gcc/testsuite/gfortran.dg/proc_ptr_result_1.f90 trunk/gcc/testsuite/gfortran.dg/proc_ptr_result_2.f90 trunk/gcc/testsuite/gfortran.dg/proc_ptr_result_3.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/decl.c trunk/gcc/fortran/parse.c trunk/gcc/fortran/primary.c trunk/gcc/fortran/resolve.c trunk/gcc/fortran/symbol.c trunk/gcc/fortran/trans-types.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gfortran.dg/external_procedures_1.f90 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36704