[Bug fortran/98023] ICE: free_expr0(): Bad expr type

kargl at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Nov 27 04:29:02 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98023

kargl at gcc dot gnu.org changed:

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

--- Comment #1 from kargl at gcc dot gnu.org ---
Bandage.


Index: gcc/gcc/fortran/expr.c
===================================================================
--- gcc/gcc/fortran/expr.c      (revision 280157)
+++ gcc/gcc/fortran/expr.c      (working copy)
@@ -525,7 +525,7 @@ free_expr0 (gfc_expr *e)
 void
 gfc_free_expr (gfc_expr *e)
 {
-  if (e == NULL)
+  if (e == NULL || e->expr_type == EXPR_UNKNOWN)
     return;
   free_expr0 (e);
   free (e);


More information about the Gcc-bugs mailing list