re PR fortran/24958 (ICE on invalid nullify)
2006-02-02 Steven G. Kargl <kargls@comcast> PR fortran/24958 match.c (gfc_match_nullify): Free the list from head not tail. PR fortran/25072 * match.c (match_forall_header): Fix internal error caused by bogus gfc_epxr pointers. gfortran.dg/nullify_2.f90: New test. From-SVN: r110517
This commit is contained in:
parent
14b9dd558c
commit
43bad4beb5
@ -1,3 +1,13 @@
|
||||
2006-02-02 Steven G. Kargl <kargls@comcast>
|
||||
|
||||
PR fortran/24958
|
||||
match.c (gfc_match_nullify): Free the list from head not tail.
|
||||
|
||||
PR fortran/25072
|
||||
* match.c (match_forall_header): Fix internal error caused by bogus
|
||||
gfc_epxr pointers.
|
||||
|
||||
|
||||
2006-01-31 Thomas Koenig <Thomas.Koenig@online.de>
|
||||
|
||||
PR fortran/26039
|
||||
|
@ -1890,7 +1890,7 @@ syntax:
|
||||
gfc_syntax_error (ST_NULLIFY);
|
||||
|
||||
cleanup:
|
||||
gfc_free_statements (tail);
|
||||
gfc_free_statements (new_st.next);
|
||||
return MATCH_ERROR;
|
||||
}
|
||||
|
||||
@ -3367,12 +3367,13 @@ static match
|
||||
match_forall_header (gfc_forall_iterator ** phead, gfc_expr ** mask)
|
||||
{
|
||||
gfc_forall_iterator *head, *tail, *new;
|
||||
gfc_expr *msk;
|
||||
match m;
|
||||
|
||||
gfc_gobble_whitespace ();
|
||||
|
||||
head = tail = NULL;
|
||||
*mask = NULL;
|
||||
msk = NULL;
|
||||
|
||||
if (gfc_match_char ('(') != MATCH_YES)
|
||||
return MATCH_NO;
|
||||
@ -3393,6 +3394,7 @@ match_forall_header (gfc_forall_iterator ** phead, gfc_expr ** mask)
|
||||
m = match_forall_iterator (&new);
|
||||
if (m == MATCH_ERROR)
|
||||
goto cleanup;
|
||||
|
||||
if (m == MATCH_YES)
|
||||
{
|
||||
tail->next = new;
|
||||
@ -3402,7 +3404,7 @@ match_forall_header (gfc_forall_iterator ** phead, gfc_expr ** mask)
|
||||
|
||||
/* Have to have a mask expression */
|
||||
|
||||
m = gfc_match_expr (mask);
|
||||
m = gfc_match_expr (&msk);
|
||||
if (m == MATCH_NO)
|
||||
goto syntax;
|
||||
if (m == MATCH_ERROR)
|
||||
@ -3415,13 +3417,14 @@ match_forall_header (gfc_forall_iterator ** phead, gfc_expr ** mask)
|
||||
goto syntax;
|
||||
|
||||
*phead = head;
|
||||
*mask = msk;
|
||||
return MATCH_YES;
|
||||
|
||||
syntax:
|
||||
gfc_syntax_error (ST_FORALL);
|
||||
|
||||
cleanup:
|
||||
gfc_free_expr (*mask);
|
||||
gfc_free_expr (msk);
|
||||
gfc_free_forall_iterator (head);
|
||||
|
||||
return MATCH_ERROR;
|
||||
|
@ -1,3 +1,8 @@
|
||||
2006-02-02 Steven G. Kargl <kargls@comcast>
|
||||
|
||||
PR fortran/24958
|
||||
gfortran.dg/nullify_2.f90: New test.
|
||||
|
||||
2006-02-02 Diego Novillo <dnovillo@redhat.com>
|
||||
|
||||
PR 25990
|
||||
|
7
gcc/testsuite/gfortran.dg/nullify_2.f90
Normal file
7
gcc/testsuite/gfortran.dg/nullify_2.f90
Normal file
@ -0,0 +1,7 @@
|
||||
! { dg-do compile }
|
||||
! PR fortran/25146
|
||||
program i
|
||||
implicit none
|
||||
TYPE (a) t1 ! { dg-error "is being used before" }
|
||||
nullify(t1%x) ! { dg-error "error in NULLIFY" }
|
||||
end program
|
Loading…
Reference in New Issue
Block a user