public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "janus at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/39630] Fortran 2003: Procedure Pointer Components
Date: Wed, 06 May 2009 21:17:00 -0000	[thread overview]
Message-ID: <20090506211734.8904.qmail@sourceware.org> (raw)
In-Reply-To: <bug-39630-16146@http.gcc.gnu.org/bugzilla/>



------- Comment #3 from janus at gcc dot gnu dot org  2009-05-06 21:17 -------
Subject: Bug 39630

Author: janus
Date: Wed May  6 21:17:16 2009
New Revision: 147206

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=147206
Log:
2009-05-06  Janus Weil  <janus@gcc.gnu.org>
            Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/39630
        * decl.c (match_procedure_interface): New function to match the
        interface for a PROCEDURE statement.
        (match_procedure_decl): Call match_procedure_interface.
        (match_ppc_decl): New function to match the declaration of a
        procedure pointer component.
        (gfc_match_procedure):  Call match_ppc_decl.
        (match_binding_attributes): Add new argument 'ppc' and handle the
        POINTER attribute for procedure pointer components.
        (match_procedure_in_type,gfc_match_generic): Added new argument to
        match_binding_attributes.
        * dump-parse-tree.c (show_expr,show_components,show_code_node): Handle
        procedure pointer components.
        * expr.c (free_expr0,gfc_copy_expr,gfc_simplify_expr): Handle EXPR_PPC.
        (gfc_check_pointer_assign): Handle procedure pointer components, but no
        full checking yet.
        (is_proc_ptr_comp): New function to determine if an expression is a
        procedure pointer component.
        * gfortran.h (expr_t): Add EXPR_PPC.
        (symbol_attribute): Add new member 'proc_pointer_comp'.
        (gfc_component): Add new member 'formal'.
        (gfc_exec_op): Add EXEC_CALL_PPC.
        (gfc_get_default_type): Changed first argument.
        (is_proc_ptr_comp): Add prototype.
        (gfc_match_varspec): Add new argument.
        * interface.c (compare_actual_formal): Handle procedure pointer
        components.
        * match.c (gfc_match_pointer_assignment,match_typebound_call): Handle
        procedure pointer components.
        * module.c (mio_expr): Handle EXPR_PPC.
        * parse.c (parse_derived): Handle procedure pointer components.
        * primary.c (gfc_match_varspec): Add new argument 'ppc_arg' and handle
        procedure pointer components.
        (gfc_variable_attr): Handle procedure pointer components.
        (gfc_match_rvalue): Added new argument to gfc_match_varspec and changed
        first argument of gfc_get_default_type.
        (match_variable): Added new argument to gfc_match_varspec.
        * resolve.c (resolve_entries,set_type,resolve_fl_parameter): Changed
        first argument of gfc_get_default_type.
        (resolve_structure_cons,resolve_actual_arglist): Handle procedure
        pointer components.
        (resolve_ppc_call): New function to resolve a call to a procedure
        pointer component (subroutine).
        (resolve_expr_ppc): New function to resolve a call to a procedure
        pointer component (function).
        (gfc_resolve_expr): Handle EXPR_PPC.
        (resolve_code): Handle EXEC_CALL_PPC.
        (resolve_fl_derived): Copy the interface for a procedure pointer
        component.
        (resolve_symbol): Fix overlong line.
        * st.c (gfc_free_statement): Handle EXEC_CALL_PPC.
        * symbol.c (gfc_get_default_type): Changed first argument.
        (gfc_set_default_type): Changed first argument of gfc_get_default_type.
        (gfc_add_component): Initialize ts.type to BT_UNKNOWN.
        * trans.h (gfc_conv_function_call): Renamed.
        * trans.c (gfc_trans_code): Handle EXEC_CALL_PPC.
        * trans-expr.c (gfc_conv_component_ref): Ditto.
        (gfc_conv_function_val): Rename to 'conv_function_val', add new
        argument 'expr' and handle procedure pointer components.
        (gfc_conv_operator_assign): Renamed gfc_conv_function_val.
        (gfc_apply_interface_mapping_to_expr): Handle EXPR_PPC.
        (gfc_conv_function_call): Rename to 'gfc_conv_procedure_call', add new
        argument 'expr' and handle procedure pointer components.
        (gfc_get_proc_ptr_comp): New function to get the backend decl for a
        procedure pointer component.
        (gfc_conv_function_expr): Renamed gfc_conv_function_call.
        (gfc_conv_structure): Handle procedure pointer components.
        * trans-intrinsic.c (gfc_conv_intrinsic_funcall,
        conv_generic_with_optional_char_arg): Renamed gfc_conv_function_call.
        * trans-stmt.h (gfc_get_proc_ptr_comp): Add prototype.
        * trans-stmt.c (gfc_trans_call): Renamed gfc_conv_function_call.
        * trans-types.h (gfc_get_ppc_type): Add prototype.
        * trans-types.c (gfc_get_ppc_type): New function to build a tree node
        for a procedure pointer component.
        (gfc_get_derived_type): Handle procedure pointer components.


2009-05-06  Janus Weil  <janus@gcc.gnu.org>

        PR fortran/39630
        * gfortran.dg/proc_decl_1.f90: Modified.
        * gfortran.dg/proc_ptr_comp_1.f90: New.
        * gfortran.dg/proc_ptr_comp_2.f90: New.
        * gfortran.dg/proc_ptr_comp_3.f90: New.
        * gfortran.dg/proc_ptr_comp_4.f90: New.
        * gfortran.dg/proc_ptr_comp_5.f90: New.
        * gfortran.dg/proc_ptr_comp_6.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/proc_ptr_comp_1.f90
    trunk/gcc/testsuite/gfortran.dg/proc_ptr_comp_2.f90
    trunk/gcc/testsuite/gfortran.dg/proc_ptr_comp_3.f90
    trunk/gcc/testsuite/gfortran.dg/proc_ptr_comp_4.f90
    trunk/gcc/testsuite/gfortran.dg/proc_ptr_comp_5.f90
    trunk/gcc/testsuite/gfortran.dg/proc_ptr_comp_6.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/decl.c
    trunk/gcc/fortran/dump-parse-tree.c
    trunk/gcc/fortran/expr.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/interface.c
    trunk/gcc/fortran/match.c
    trunk/gcc/fortran/module.c
    trunk/gcc/fortran/parse.c
    trunk/gcc/fortran/primary.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/st.c
    trunk/gcc/fortran/symbol.c
    trunk/gcc/fortran/trans-expr.c
    trunk/gcc/fortran/trans-intrinsic.c
    trunk/gcc/fortran/trans-stmt.c
    trunk/gcc/fortran/trans-stmt.h
    trunk/gcc/fortran/trans-types.c
    trunk/gcc/fortran/trans-types.h
    trunk/gcc/fortran/trans.c
    trunk/gcc/fortran/trans.h
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/proc_decl_1.f90


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39630


  parent reply	other threads:[~2009-05-06 21:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-03 18:26 [Bug fortran/39630] New: " janus at gcc dot gnu dot org
2009-04-03 18:30 ` [Bug fortran/39630] " janus at gcc dot gnu dot org
2009-04-16 11:29 ` janus at gcc dot gnu dot org
2009-05-06 21:17 ` janus at gcc dot gnu dot org [this message]
2009-05-06 21:24 ` janus at gcc dot gnu dot org
2009-07-25 11:57 ` [Bug fortran/39630] [F03] Procedure Pointer Components with PASS janus at gcc dot gnu dot org
2009-07-25 12:06 ` [Bug fortran/39630] [F03] Procedure Pointer Components janus at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090506211734.8904.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).