diff -uNr gcc-4061.orig/libgfortran/runtime/string.c gcc-4061/libgfortran/runtime/string.c --- gcc-4061.orig/libgfortran/runtime/string.c 2003-07-27 01:27:53.000000000 +0900 +++ gcc-4061/libgfortran/runtime/string.c 2005-06-02 23:51:18.000000000 +0900 @@ -31,18 +31,11 @@ static int compare0 (const char *s1, int s1_len, const char *s2) { - int i; + int len; - if (strncasecmp (s1, s2, s1_len) != 0) - return 0; - - /* The rest of s1 needs to be blanks for equality. */ - - for (i = strlen (s2); i < s1_len; i++) - if (s1[i] != ' ') - return 0; - - return 1; + /* Strip trailing blanks from the Fortran string. */ + len = fstrlen (s1, s1_len); + return strncasecmp (s1, s2, len) == 0; }