Commit fc68d279 authored by Matthias Redies's avatar Matthias Redies

undefined behaviour for i > 20 (gfortran warning)

parent f7de8dc7
...@@ -964,15 +964,15 @@ ...@@ -964,15 +964,15 @@
ELEMENTAL FUNCTION lower_case(string) ELEMENTAL FUNCTION lower_case(string)
CHARACTER(len=*), INTENT(IN) :: string CHARACTER(len=*), INTENT(IN) :: string
CHARACTER(len=20):: lower_case CHARACTER(len=len(string)) :: lower_case
INTEGER :: i INTEGER :: i
DO i = 1, LEN (string) DO i = 1, LEN (string)
IF ( IACHAR ('A') <= IACHAR (string(i:i))& IF ( IACHAR ('A') <= IACHAR (string(i:i)) &
& .and. IACHAR ('Z') >= IACHAR (string(i:i))) THEN .and. IACHAR ('Z') >= IACHAR (string(i:i))) THEN
lower_case(i:i) = ACHAR (IACHAR (string(i:i))& lower_case(i:i) = ACHAR (IACHAR (string(i:i))&
& + IACHAR ('a') - IACHAR ('A')) + IACHAR ('a') - IACHAR ('A'))
ELSE ELSE
lower_case(i:i) = string(i:i) lower_case(i:i) = string(i:i)
END IF END IF
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment