https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85534
Dominique d'Humieres changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed||2018-04-26
Ever confirmed|0 |1
--- Comment #1 from Dominique d'Humieres ---
Confirmed from 6.4 up to trunk (9.0). Reduced test case
module test
contains
function w2at(word) result(asciitable)
character(len=*), intent(in) :: word
integer, dimension(:), allocatable :: asciitable
integer :: i
allocate(asciitable(len(word)))
forall(i=1:len(word)) asciitable(i) = iachar(word(i:i))
end function w2at
end module test
program tst
use test
implicit none
character(len=256) :: word1
integer, dimension(:), allocatable :: aword1, help
word1="*STEP"
allocate(help,source=w2at(word1))
print *, "lbound of help = ", lbound(help)
print *, "lbound of pack = ", lbound(pack(help,help/=32))
allocate(aword1,source=pack(help,help/=32))
print *, "lbound of aword1 = ", lbound(aword1)
end program
which gives
lbound of help =1
lbound of pack =1
lbound of aword1 =0