This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/38936] F2003: ASSOCIATE construct / improved SELECT TYPE (a=>expr)



------- Comment #4 from domob at gcc dot gnu dot org  2010-06-10 14:48 -------
Subject: Bug 38936

Author: domob
Date: Thu Jun 10 14:47:49 2010
New Revision: 160550

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160550
Log:
2010-06-10  Daniel Kraft  <d@domob.eu>

        PR fortran/38936
        * gfortran.h (enum gfc_statement): Add ST_ASSOCIATE, ST_END_ASSOCIATE.
        (struct gfc_symbol): New field `assoc'.
        (struct gfc_association_list): New struct.
        (struct gfc_code): New struct `block' in union, move `ns' there
        and add association list.
        (gfc_free_association_list): New method.
        (gfc_has_vector_subscript): Made public;
        * match.h (gfc_match_associate): New method.
        * parse.h (enum gfc_compile_state): Add COMP_ASSOCIATE.
        * decl.c (gfc_match_end): Handle ST_END_ASSOCIATE.
        * interface.c (gfc_has_vector_subscript): Made public.
        (compare_actual_formal): Rename `has_vector_subscript' accordingly.
        * match.c (gfc_match_associate): New method.
        (gfc_match_select_type): Change reference to gfc_code's `ns' field.
        * primary.c (match_variable): Don't allow names associated to expr
here.
        * parse.c (decode_statement): Try matching ASSOCIATE statement.
        (case_exec_markers, case_end): Add ASSOCIATE statement.
        (gfc_ascii_statement): Hande ST_ASSOCIATE and ST_END_ASSOCIATE.
        (parse_associate): New method.
        (parse_executable): Handle ST_ASSOCIATE.
        (parse_block_construct): Change reference to gfc_code's `ns' field.
        * resolve.c (resolve_select_type): Ditto.
        (resolve_code): Ditto.
        (resolve_block_construct): Ditto and add comment.
        (resolve_select_type): Set association list in generated BLOCK to NULL.
        (resolve_symbol): Resolve associate names.
        * st.c (gfc_free_statement): Change reference to gfc_code's `ns' field
        and free association list.
        (gfc_free_association_list): New method.
        * symbol.c (gfc_new_symbol): NULL new field `assoc'.
        * trans-stmt.c (gfc_trans_block_construct): Change reference to
        gfc_code's `ns' field.

2010-06-10  Daniel Kraft  <d@domob.eu>

        PR fortran/38936
        * gfortran.dg/associate_1.f03: New test.
        * gfortran.dg/associate_2.f95: New test.
        * gfortran.dg/associate_3.f03: New test.
        * gfortran.dg/associate_4.f08: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/associate_1.f03
    trunk/gcc/testsuite/gfortran.dg/associate_2.f95
    trunk/gcc/testsuite/gfortran.dg/associate_3.f03
    trunk/gcc/testsuite/gfortran.dg/associate_4.f08
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/decl.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/interface.c
    trunk/gcc/fortran/match.c
    trunk/gcc/fortran/match.h
    trunk/gcc/fortran/parse.c
    trunk/gcc/fortran/parse.h
    trunk/gcc/fortran/primary.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/st.c
    trunk/gcc/fortran/symbol.c
    trunk/gcc/fortran/trans-stmt.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]