]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/42051 ([OOP] ICE on array-valued function with CLASS formal argument)
authorMikael Morin <mikael@gcc.gnu.org>
Sat, 31 Jul 2010 10:27:36 +0000 (10:27 +0000)
committerMikael Morin <mikael@gcc.gnu.org>
Sat, 31 Jul 2010 10:27:36 +0000 (10:27 +0000)
2010-07-31  Mikael Morin  <mikael@gcc.gnu.org>

PR fortran/42051
PR fortran/44064
* symbol.c (changed_syms): Made non-static.
* parse.c (changed_syms): Declare new external.
(next_statement): Assert changed_syms is NULL at the beginning.

From-SVN: r162776

gcc/fortran/ChangeLog
gcc/fortran/parse.c
gcc/fortran/symbol.c

index bf7d4d19463e1c62dc9d6f00c051cf4106a2ac0b..1bc2a1fa2af754956585b8cfd8ae7897b109f256 100644 (file)
@@ -1,3 +1,11 @@
+2010-07-31  Mikael Morin  <mikael@gcc.gnu.org>
+
+       PR fortran/42051
+       PR fortran/44064
+       * symbol.c (changed_syms): Made non-static.
+       * parse.c (changed_syms): Declare new external. 
+       (next_statement): Assert changed_syms is NULL at the beginning.
+
 2010-07-30  Janus Weil  <janus@gcc.gnu.org>
            Steven G. Kargl  <kargl@gcc.gnu.org>
 
index 989d6448b3bdcdea7b655f7d67727d5060dae771..94440e984576280550b5d86c97823ae6c889c2aa 100644 (file)
@@ -879,6 +879,7 @@ blank_line:
   return ST_NONE;
 }
 
+extern gfc_symbol *changed_syms;
 
 /* Return the next non-ST_NONE statement to the caller.  We also worry
    about including files and the ends of include files at this stage.  */
@@ -889,6 +890,9 @@ next_statement (void)
   gfc_statement st;
   locus old_locus;
 
+  /* We start with a clean state.  */
+  gcc_assert (changed_syms == NULL);
+
   gfc_new_block = NULL;
 
   gfc_current_ns->old_cl_list = gfc_current_ns->cl_list;
index e713cd83192e563f59fca0064db7b4980ae26062..0231da110fe357847216d1d0eab711a413f891ad 100644 (file)
@@ -98,7 +98,7 @@ gfc_namespace *gfc_global_ns_list;
 
 gfc_gsymbol *gfc_gsym_root = NULL;
 
-static gfc_symbol *changed_syms = NULL;
+gfc_symbol *changed_syms = NULL;
 
 gfc_dt_list *gfc_derived_types;