mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-15 07:40:29 +08:00
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
This commit is contained in:
parent
20b84bef2b
commit
31fee91edf
@ -78,6 +78,17 @@
|
||||
* dependency.c (gfc_check_dependency): Add argument alising check.
|
||||
* symbol.c (gfc_symbols_could_alias): Add argument alising check.
|
||||
|
||||
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.
|
||||
|
||||
2010-07-22 Daniel Kraft <d@domob.eu>
|
||||
|
||||
* trans-stmt.c (gfc_trans_return): Put back in the handling of se.post,
|
||||
|
@ -1355,7 +1355,7 @@ typedef struct gfc_namespace
|
||||
struct gfc_code *code;
|
||||
|
||||
/* Points to the equivalences set up in this namespace. */
|
||||
struct gfc_equiv *equiv;
|
||||
struct gfc_equiv *equiv, *old_equiv;
|
||||
|
||||
/* Points to the equivalence groups produced by trans_common. */
|
||||
struct gfc_equiv_list *equiv_lists;
|
||||
@ -2611,6 +2611,7 @@ void gfc_free_forall_iterator (gfc_forall_iterator *);
|
||||
void gfc_free_alloc_list (gfc_alloc *);
|
||||
void gfc_free_namelist (gfc_namelist *);
|
||||
void gfc_free_equiv (gfc_equiv *);
|
||||
void gfc_free_equiv_until (gfc_equiv *, gfc_equiv *);
|
||||
void gfc_free_data (gfc_data *);
|
||||
void gfc_free_case_list (gfc_case *);
|
||||
|
||||
|
@ -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
|
||||
|
@ -892,6 +892,7 @@ 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;
|
||||
for (;;)
|
||||
{
|
||||
gfc_statement_label = NULL;
|
||||
@ -1651,6 +1652,9 @@ reject_statement (void)
|
||||
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;
|
||||
|
||||
gfc_new_block = NULL;
|
||||
gfc_undo_symbols ();
|
||||
gfc_clear_warning ();
|
||||
|
Loading…
x
Reference in New Issue
Block a user