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/71883] [5/6/7 Regression] ICE in identical_array_ref, at fortran/dependency.c:104


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

--- Comment #5 from kargl at gcc dot gnu.org ---
(In reply to Thomas Koenig from comment #4)
> The problem here is that we want to do some dependency
> checking on something that is invalid.
> 
> Maybe the best way would be to skip the whole pass if a
> previous fatal error was diagnosed.
> 
> Is there a way to check for this?

You can check the error count.  If it is
greater than 0, you have an error.  Here's
an example from my private tree

--- expr.c      (revision 237945)
+++ expr.c      (working copy)
@@ -970,8 +970,14 @@ gfc_is_constant_expr (gfc_expr *e)


     default:
-      gfc_internal_error ("gfc_is_constant_expr(): Unknown expression type");
-      return 0;
+      {
+       int e, w;
+       gfc_get_errors (&w, &e);
+       if (e < 1)
+         gfc_internal_error ("gfc_is_constant_expr(): Unknown "
+                               "expression type");
+       return 0;
+      }
     }
 }

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