The following code misbehaves with nvfortran-21.7:
program p
type t
character(:), allocatable :: c(:)
end type
character(len=8) :: a(2) = ‘12 45 78’
type(t) :: x
x%c = a
print *, x%c(1)(7:8) ! expect: 78
print *, x%c ! expect: 12 45 7812 45 78
print *, len (x%c) ! expect: 8
print *, size (x%c) ! expect: 2
end
With nvfortran-21.7 I get:
1212
2
2
while Intel and gfortran both give:
78
12 45 7812 45 78
8
2
which appears correct.