Skip to content

Commit 819e940

Browse files
authored
Merge pull request #2619 from andrew-platt/b/rocm-flang-2
Flang doesn't compile NWTC_IO.f90
2 parents 1e43d46 + 9d5037e commit 819e940

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

modules/nwtc-library/src/NWTC_IO.f90

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2074,7 +2074,6 @@ SUBROUTINE GetWords ( Line, Words, NumWords, NumFound, IgnoreQuotes )
20742074
INTEGER :: iWord ! Word index.
20752075
INTEGER :: i ! Character index in line.
20762076
INTEGER :: iChar ! Character index in word.
2077-
CHARACTER(len=1) :: Char ! Current character
20782077
LOGICAL :: InQuotes ! Flag indicating text is within quotes
20792078
LOGICAL :: IgnoreQuotesLoc ! Local flag to ignore quotes
20802079

@@ -2108,11 +2107,8 @@ SUBROUTINE GetWords ( Line, Words, NumWords, NumFound, IgnoreQuotes )
21082107
! Loop through characters in line
21092108
do i = 1, len_trim(line)
21102109

2111-
! Get current character
2112-
Char = Line(i:i)
2113-
21142110
! Select based on character
2115-
select case (Char)
2111+
select case (Line(i:i))
21162112
case ('"', "'") ! Double quotes, single quotes
21172113
if (IgnoreQuotesLoc .or. InQuotes) then
21182114
InQuotes = .false.
@@ -2152,7 +2148,7 @@ SUBROUTINE GetWords ( Line, Words, NumWords, NumFound, IgnoreQuotes )
21522148
end if
21532149

21542150
! Add character to word
2155-
Words(iWord)(iChar:iChar) = Char
2151+
Words(iWord)(iChar:iChar) = Line(i:i)
21562152

21572153
end do
21582154

0 commit comments

Comments
 (0)