match.c (gfc_match): Add assertion to catch wrong calls trying to match upper-case...
authorDaniel Kraft <d@domob.eu>
Thu, 24 Jul 2008 16:06:55 +0000 (18:06 +0200)
committerDaniel Kraft <domob@gcc.gnu.org>
Thu, 24 Jul 2008 16:06:55 +0000 (18:06 +0200)
2008-07-24  Daniel Kraft  <d@domob.eu>

* match.c (gfc_match):  Add assertion to catch wrong calls trying to
match upper-case characters.

From-SVN: r138120

gcc/fortran/ChangeLog
gcc/fortran/match.c

index 1f0ba0d..5d930f5 100644 (file)
@@ -1,3 +1,8 @@
+2008-07-24  Daniel Kraft  <d@domob.eu>
+
+       * match.c (gfc_match):  Add assertion to catch wrong calls trying to
+       match upper-case characters.
+
 2008-07-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
        PR fortran/29952
index 19a97e9..42fe794 100644 (file)
@@ -1187,6 +1187,11 @@ loop:
        }
 
     default:
+
+      /* gfc_next_ascii_char converts characters to lower-case, so we shouldn't
+        expect an upper case character here!  */
+      gcc_assert (TOLOWER (c) == c);
+
       if (c == gfc_next_ascii_char ())
        goto loop;
       break;