]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/86907 (bogus warning "No location in expression near")
authorThomas Koenig <tkoenig@gcc.gnu.org>
Sat, 27 Oct 2018 10:26:23 +0000 (10:26 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Sat, 27 Oct 2018 10:26:23 +0000 (10:26 +0000)
2018-10-27  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/86907
* frontend-passes.c (check_locus_code): Add information that
warning about missing location information points to an
inconsisten internal state.
(check_locus_expr): Likewise.

From-SVN: r265559

gcc/fortran/ChangeLog
gcc/fortran/frontend-passes.c

index 91697532ca4141aa2cf6f175c1d74ad14031d8ad..02861ef9899d732a7917010164ecab1df257a439 100644 (file)
@@ -1,3 +1,11 @@
+2018-10-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
+
+       PR fortran/86907
+       * frontend-passes.c (check_locus_code): Add information that
+       warning about missing location information points to an
+       inconsisten internal state.
+       (check_locus_expr): Likewise.
+
 2018-10-25  Jakub Jelinek  <jakub@redhat.com>
 
        PR fortran/87725
index d380dcfb3cb429cea9d5d98f6b7944589113b4b6..a6af96c43dbda332ee3b6f19ebdda05028818ab2 100644 (file)
@@ -190,7 +190,8 @@ check_locus_code (gfc_code **c, int *walk_subtrees ATTRIBUTE_UNUSED,
 {
   current_code = c;
   if (c && *c && (((*c)->loc.nextc == NULL) || ((*c)->loc.lb == NULL)))
-    gfc_warning_internal (0, "No location in statement");
+    gfc_warning_internal (0, "Inconsistent internal state: "
+                         "No location in statement");
 
   return 0;
 }
@@ -205,7 +206,8 @@ check_locus_expr (gfc_expr **e, int *walk_subtrees ATTRIBUTE_UNUSED,
 {
 
   if (e && *e && (((*e)->where.nextc == NULL || (*e)->where.lb == NULL)))
-    gfc_warning_internal (0, "No location in expression near %L",
+    gfc_warning_internal (0, "Inconsistent internal state: "
+                         "No location in expression near %L",
                          &((*current_code)->loc));
   return 0;
 }