------- Comment #2 from tkoenig at gcc dot gnu dot org 2006-05-28 14:53 ------- It's even worse:
$ cat cmp.f program main external isgreater logical isgreater print *,"a" > "ä" print *,isgreater("a", "ä") end logical function isgreater(s1, s2) character*1 s1, s2 isgreater = s1 > s2 end $ gfortran cmp.f $ ./a.out T F The front end comparison is done using C's native char, whereas the back end uses strncmp (or memcpy to fix PR 27784, hopefully soon), which treats chars as unsigned. Naturally, this leads to breakage when the native char type is signed. Oh well... this doesn't look too hard to fix. The front end should use unsigned char. -- tkoenig at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tkoenig at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27715