]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/fortran/trans-stmt.cc
re PR fortran/44602 ([F2008] EXIT: Jump to end of construct)
authorDaniel Kraft <d@domob.eu>
Fri, 3 Sep 2010 08:01:51 +0000 (10:01 +0200)
committerDaniel Kraft <domob@gcc.gnu.org>
Fri, 3 Sep 2010 08:01:51 +0000 (10:01 +0200)
commite5ca969363516ec05db3357c22079d7fdcd70ccf
treeab6ea012d837fff217565926dab37412151bd71e
parente97e08bc2e561f285dab48468b5fa0cba6a48d88
re PR fortran/44602 ([F2008] EXIT: Jump to end of construct)

2010-09-03  Daniel Kraft  <d@domob.eu>

PR fortran/44602
* gfortran.h (struct gfc_code): Renamed `whichloop' to
`which_construct' as this is no longer restricted to loops.
* parse.h (struct gfc_state_data): New field `construct'.
* match.c (match_exit_cycle): Handle EXIT from non-loops.
* parse.c (push_state): Set `construct' field.
* resolve.c (resolve_select_type): Extend comment.
* trans-stmt.c (gfc_trans_if): Add exit label.
(gfc_trans_block_construct), (gfc_trans_select): Ditto.
(gfc_trans_simple_do): Store exit/cycle labels on the gfc_code itself.
(gfc_trans_do), (gfc_trans_do_while): Ditto.
(gfc_trans_exit): Use new name `which_construct' instead of `whichloop'.
(gfc_trans_cycle): Ditto.
(gfc_trans_if_1): Use fold_build3_loc instead of fold_build3.

2010-09-03  Daniel Kraft  <d@domob.eu>

PR fortran/44602
* gfortran.dg/exit_2.f08; Adapt error messages.
* gfortran.dg/exit_3.f08: New test.
* gfortran.dg/exit_4.f08: New test.
* gfortran.dg/exit_5.f03: New test.

From-SVN: r163798
12 files changed:
gcc/fortran/ChangeLog
gcc/fortran/gfortran.h
gcc/fortran/match.c
gcc/fortran/parse.c
gcc/fortran/parse.h
gcc/fortran/resolve.c
gcc/fortran/trans-stmt.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/exit_2.f08
gcc/testsuite/gfortran.dg/exit_3.f08 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/exit_4.f08 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/exit_5.f03 [new file with mode: 0644]