aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/parse.c')
-rw-r--r--gcc/fortran/parse.c36
1 files changed, 3 insertions, 33 deletions
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c
index ec1d0d6..b72863a 100644
--- a/gcc/fortran/parse.c
+++ b/gcc/fortran/parse.c
@@ -116,7 +116,6 @@ use_modules (void)
gfc_pop_error (&old_error);
gfc_commit_symbols ();
gfc_warning_check ();
- gfc_current_ns->old_cl_list = gfc_current_ns->cl_list;
gfc_current_ns->old_equiv = gfc_current_ns->equiv;
gfc_current_ns->old_data = gfc_current_ns->data;
last_was_use_stmt = false;
@@ -1386,7 +1385,6 @@ next_statement (void)
gfc_new_block = NULL;
- gfc_current_ns->old_cl_list = gfc_current_ns->cl_list;
gfc_current_ns->old_equiv = gfc_current_ns->equiv;
gfc_current_ns->old_data = gfc_current_ns->data;
for (;;)
@@ -2483,41 +2481,13 @@ accept_statement (gfc_statement st)
}
-/* Clear default character types with charlen pointers that are about
- to become invalid. */
-
-static void
-clear_default_charlen (gfc_namespace *ns, const gfc_charlen *cl,
- const gfc_charlen *end)
-{
- gfc_typespec *ts;
-
- for (ts = &ns->default_type[0]; ts < &ns->default_type[GFC_LETTERS]; ts++)
- if (ts->type == BT_CHARACTER)
- {
- const gfc_charlen *cl2;
- for (cl2 = cl; cl2 != end; cl2 = cl2->next)
- if (ts->u.cl == cl2)
- {
- ts->u.cl = NULL;
- ts->type = BT_UNKNOWN;
- break;
- }
- }
-}
-
-/* Undo anything tentative that has been built for the current
- statement. */
+/* Undo anything tentative that has been built for the current statement,
+ except if a gfc_charlen structure has been added to current namespace's
+ list of gfc_charlen structure. */
static void
reject_statement (void)
{
- /* Revert to the previous charlen chain. */
- clear_default_charlen (gfc_current_ns,
- gfc_current_ns->cl_list, gfc_current_ns->old_cl_list);
- gfc_free_charlen (gfc_current_ns->cl_list, gfc_current_ns->old_cl_list);
- gfc_current_ns->cl_list = gfc_current_ns->old_cl_list;
-
gfc_free_equiv_until (gfc_current_ns->equiv, gfc_current_ns->old_equiv);
gfc_current_ns->equiv = gfc_current_ns->old_equiv;