2 ! Tests the fix for PR31257, in which achar caused an ICE because it had no
5 ! The code comes from http://www.star.le.ac.uk/~cgp/fortran.html (by Clive Page)
6 ! Reported by Thomas Koenig <tkoenig@gcc.gnu.org>
8 if (any (Up ("AbCdEfGhIjKlM") .ne. (/"ABCDEFGHIJKLM"/))) call abort ()
10 Character (len=20) Function Up (string)
11 Character(len=*) string
13 transfer(merge(achar(iachar(transfer(string,"x",len(string)))- &
14 (ichar('a')-ichar('A')) ), &
15 transfer(string,"x",len(string)) , &
16 transfer(string,"x",len(string)) >= "a" .and. &
17 transfer(string,"x",len(string)) <= "z"), repeat("x", len(string)))