mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-12 01:17:13 +08:00
re PR fortran/17708 (gfortran problem with goto inside loop)
fortran/ PR fortran/17708 * parse.c (accept_statement): Don't treat END DO like END IF and END SELECT. (parse_do_block): Generate possible END DO label inside END DO block. also, added ChangeLog entry for previous commit. testsuite/ PR fortran/17708 * gfortran.dg/pr17708.f90: New test. From-SVN: r88529
This commit is contained in:
parent
95638988cb
commit
73a014b549
@ -12,6 +12,19 @@
|
||||
* iresolve.c (gfc_resolve_mvbits): New function.
|
||||
(gfc_resolve_random_number): Remove empty line at end of function.
|
||||
|
||||
* trans-const.c (gfc_build_cstring_const): New function.
|
||||
(gfc_init_cst): Use new function.
|
||||
* trans-const.h (gfc_build_cstring_const): Add prototype.
|
||||
* trans-io.c (set_string, set_error_locus): Use new function.
|
||||
* trans-stmt.c (gfc_trans_goto): Use new function.
|
||||
|
||||
PR fortran/17708
|
||||
* parse.c (accept_statement): Don't treat END DO like END IF and
|
||||
END SELECT.
|
||||
(parse_do_block): Generate possible END DO label inside END DO
|
||||
block.
|
||||
|
||||
|
||||
2004-10-04 Erik Schnetter <schnetter@aei.mpg.de>
|
||||
|
||||
* scanner.c (preprocessor_line): Accept preprocessor lines without
|
||||
|
@ -1033,7 +1033,6 @@ accept_statement (gfc_statement st)
|
||||
construct. */
|
||||
|
||||
case ST_ENDIF:
|
||||
case ST_ENDDO:
|
||||
case ST_END_SELECT:
|
||||
if (gfc_statement_label != NULL)
|
||||
{
|
||||
@ -2003,7 +2002,13 @@ loop:
|
||||
&& s.ext.end_do_label != gfc_statement_label)
|
||||
gfc_error_now
|
||||
("Statement label in ENDDO at %C doesn't match DO label");
|
||||
/* Fall through */
|
||||
|
||||
if (gfc_statement_label != NULL)
|
||||
{
|
||||
new_st.op = EXEC_NOP;
|
||||
add_statement ();
|
||||
}
|
||||
break;
|
||||
|
||||
case ST_IMPLIED_ENDDO:
|
||||
break;
|
||||
|
@ -6,6 +6,9 @@
|
||||
PR fortran/17631
|
||||
* gfortran.fortran-torture/execute/intrinsic_mvbits.f90: New test.
|
||||
|
||||
PR fortran/17708
|
||||
* gfortran.dg/pr17708.f90: New test.
|
||||
|
||||
2004-10-04 Chao-ying Fu <fu@mips.com>
|
||||
|
||||
* gcc.dg/vect/pr16105.c: Enable for mipsisa64*-*-*.
|
||||
|
9
gcc/testsuite/gfortran.dg/pr17708.f90
Normal file
9
gcc/testsuite/gfortran.dg/pr17708.f90
Normal file
@ -0,0 +1,9 @@
|
||||
! { dg-do run }
|
||||
program test
|
||||
j = 0
|
||||
do 10 i=1,3
|
||||
if(i == 2) goto 10 ! { dg-warning "" "" }
|
||||
j = j+1
|
||||
10 enddo
|
||||
if (j/=2) call abort
|
||||
end
|
Loading…
Reference in New Issue
Block a user