From befdf74172fe5f6d61f708e152f2e54540b75f21 Mon Sep 17 00:00:00 2001 From: Daniel Kraft Date: Thu, 24 Jul 2008 18:06:55 +0200 Subject: [PATCH] match.c (gfc_match): Add assertion to catch wrong calls trying to match upper-case characters. 2008-07-24 Daniel Kraft * match.c (gfc_match): Add assertion to catch wrong calls trying to match upper-case characters. From-SVN: r138120 --- gcc/fortran/ChangeLog | 5 +++++ gcc/fortran/match.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 1f0ba0d3487..5d930f5524c 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2008-07-24 Daniel Kraft + + * match.c (gfc_match): Add assertion to catch wrong calls trying to + match upper-case characters. + 2008-07-24 Thomas Koenig PR fortran/29952 diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 19a97e930e9..42fe7943aea 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -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; -- 2.30.2