summaryrefslogtreecommitdiff
path: root/gcc/fortran/match.c
diff options
context:
space:
mode:
authorMikael Morin <mikael@gcc.gnu.org>2010-07-25 17:01:15 +0000
committerMikael Morin <mikael@gcc.gnu.org>2010-07-25 17:01:15 +0000
commit31fee91edf762ff41ab637698c855cb201e4e6cb (patch)
tree741b2b6a14d8e50c49bfb3012ae66b8c5847a4ae /gcc/fortran/match.c
parent20b84bef2b603adfc1a079de6575021c3529077f (diff)
downloadgcc-31fee91edf762ff41ab637698c855cb201e4e6cb.tar.gz
re PR fortran/44660 (ICE in resolve_equivalence())
2010-07-25 Mikael Morin <mikael@gcc.gnu.org> PR fortran/44660 * gfortran.h (gfc_namespace): New field old_equiv. (gfc_free_equiv_until): New prototype. * match.c (gfc_free_equiv_until): New, renamed from gfc_free_equiv with a parameterized stop condition. (gfc_free_equiv): Use gfc_free_equiv_until. * parse.c (next_statement): Save equivalence list. (reject_statement): Restore equivalence list. From-SVN: r162516
Diffstat (limited to 'gcc/fortran/match.c')
-rw-r--r--gcc/fortran/match.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c
index 92580e359db..bd73929b865 100644
--- a/gcc/fortran/match.c
+++ b/gcc/fortran/match.c
@@ -4035,18 +4035,25 @@ gfc_match_module (void)
do this. */
void
-gfc_free_equiv (gfc_equiv *eq)
+gfc_free_equiv_until (gfc_equiv *eq, gfc_equiv *stop)
{
- if (eq == NULL)
+ if (eq == stop)
return;
gfc_free_equiv (eq->eq);
- gfc_free_equiv (eq->next);
+ gfc_free_equiv_until (eq->next, stop);
gfc_free_expr (eq->expr);
gfc_free (eq);
}
+void
+gfc_free_equiv (gfc_equiv *eq)
+{
+ gfc_free_equiv_until (eq, NULL);
+}
+
+
/* Match an EQUIVALENCE statement. */
match