This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/57895] Segmentation fault in gfc_restore_last_undo_checkpoint


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57895

Mikael Morin <mikael at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikael at gcc dot gnu.org

--- Comment #2 from Mikael Morin <mikael at gcc dot gnu.org> ---
gfc_restore_last_undo_checkpoint seems to take care of the cleanup, so we don't
need to do it in gfc_match_common.
The following fixes the segfault.

--- a/match.c
+++ b/match.c
@@ -4520,10 +4520,6 @@ syntax:
   gfc_syntax_error (ST_COMMON);

 cleanup:
-  if (old_blank_common)
-    old_blank_common->common_next = NULL;
-  else
-    gfc_current_ns->blank_common.head = NULL;
   gfc_free_array_spec (as);
   return MATCH_ERROR;
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]