public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "domob at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/39626] Fortran 2008: Implement BLOCK construct
Date: Tue, 29 Sep 2009 07:43:00 -0000	[thread overview]
Message-ID: <20090929074304.3993.qmail@sourceware.org> (raw)
In-Reply-To: <bug-39626-16338@http.gcc.gnu.org/bugzilla/>



------- Comment #5 from domob at gcc dot gnu dot org  2009-09-29 07:43 -------
Subject: Bug 39626

Author: domob
Date: Tue Sep 29 07:42:42 2009
New Revision: 152266

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152266
Log:
2009-09-29  Daniel Kraft  <d@domob.eu>

        PR fortran/39626
        * gfortran.h (enum gfc_statement): Add ST_BLOCK and ST_END_BLOCK.
        (struct gfc_namespace): Convert flags to bit-fields and add flag
        `construct_entities' for use with BLOCK constructs.
        (enum gfc_exec_code): Add EXEC_BLOCK.
        (struct gfc_code): Add namespace field to union for EXEC_BLOCK.
        * match.h (gfc_match_block): New prototype.
        * parse.h (enum gfc_compile_state): Add COMP_BLOCK.
        * trans.h (gfc_process_block_locals): New prototype.
        (gfc_trans_deferred_vars): Made public, new prototype.
        * trans-stmt.h (gfc_trans_block_construct): New prototype.
        * decl.c (gfc_match_end): Handle END BLOCK correctly.
        (gfc_match_intent): Error if inside of BLOCK.
        (gfc_match_optional), (gfc_match_value): Ditto.
        * match.c (gfc_match_block): New routine.
        * parse.c (decode_statement): Handle BLOCK statement.
        (case_exec_markers): Add ST_BLOCK.
        (case_end): Add ST_END_BLOCK.
        (gfc_ascii_statement): Handle ST_BLOCK and ST_END_BLOCK.
        (parse_spec): Check for statements not allowed inside of BLOCK.
        (parse_block_construct): New routine.
        (parse_executable): Parse BLOCKs.
        (parse_progunit): Disallow CONTAINS in BLOCK constructs.
        * resolve.c (is_illegal_recursion): Find real container procedure and
        don't get confused by BLOCK constructs.
        (resolve_block_construct): New routine.
        (gfc_resolve_blocks), (resolve_code): Handle EXEC_BLOCK.
        * st.c (gfc_free_statement): Handle EXEC_BLOCK statements.
        * trans-decl.c (saved_local_decls): New static variable.
        (add_decl_as_local): New routine.
        (gfc_finish_var_decl): Add variable as local if inside BLOCK.
        (gfc_trans_deferred_vars): Make public.
        (gfc_process_block_locals): New routine.
        * trans-stmt.c (gfc_trans_block_construct): New routine.
        * trans.c (gfc_trans_code): Handle EXEC_BLOCK statements.

2009-09-29  Daniel Kraft  <d@domob.eu>

        PR fortran/39626
        * gfortran.dg/block_1.f08: New test.
        * gfortran.dg/block_2.f08: New test.
        * gfortran.dg/block_3.f90: New test.
        * gfortran.dg/block_4.f08: New test.
        * gfortran.dg/block_5.f08: New test.
        * gfortran.dg/block_6.f08: New test.
        * gfortran.dg/block_7.f08: New test.
        * gfortran.dg/block_8.f08: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/block_1.f08
    trunk/gcc/testsuite/gfortran.dg/block_2.f08
    trunk/gcc/testsuite/gfortran.dg/block_3.f90
    trunk/gcc/testsuite/gfortran.dg/block_4.f08
    trunk/gcc/testsuite/gfortran.dg/block_5.f08
    trunk/gcc/testsuite/gfortran.dg/block_6.f08
    trunk/gcc/testsuite/gfortran.dg/block_7.f08
    trunk/gcc/testsuite/gfortran.dg/block_8.f08
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/decl.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/match.c
    trunk/gcc/fortran/match.h
    trunk/gcc/fortran/parse.c
    trunk/gcc/fortran/parse.h
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/st.c
    trunk/gcc/fortran/trans-decl.c
    trunk/gcc/fortran/trans-stmt.c
    trunk/gcc/fortran/trans-stmt.h
    trunk/gcc/fortran/trans.c
    trunk/gcc/fortran/trans.h
    trunk/gcc/testsuite/ChangeLog


-- 


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


  parent reply	other threads:[~2009-09-29  7:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-03 14:49 [Bug fortran/39626] New: " domob at gcc dot gnu dot org
2009-04-03 16:43 ` [Bug fortran/39626] " steven at gcc dot gnu dot org
2009-08-30 10:00 ` domob at gcc dot gnu dot org
2009-09-10 19:10 ` burnus at gcc dot gnu dot org
2009-09-28 14:49 ` domob at gcc dot gnu dot org
2009-09-29  7:43 ` domob at gcc dot gnu dot org [this message]
2009-09-29  7:49 ` [Bug fortran/39626] Correctly implement details of Fortran 2008 " domob at gcc dot gnu dot org
2009-09-29  7:49 ` domob at gcc dot gnu dot org
2010-02-10 18:26 ` domob at gcc dot gnu dot org
2010-02-17 21:52 ` burnus 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=20090929074304.3993.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).