+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
gfc_syntax_error (ST_NULLIFY);
cleanup:
- gfc_free_statements (tail);
+ gfc_free_statements (new_st.next);
return MATCH_ERROR;
}
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;
m = match_forall_iterator (&new);
if (m == MATCH_ERROR)
goto cleanup;
+
if (m == MATCH_YES)
{
tail->next = new;
/* 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)
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;