Hello. I am using:
$ nvfortran --version
nvfortran 21.9-0 64-bit target on x86-64 Linux -tp zen
NVIDIA Compilers and Tools
Here is my test code:
$ cat test_create_single.f90
program test_create_single
implicit none
character(len = :), allocatable:: attr_name(:)
type coord_def
character(len = :), allocatable:: attr_name(:)
end type coord_def
type(coord_def) coordinates
attr_name = ["units"]
print *, 'attr_name: "', attr_name, '"'
coordinates%attr_name = attr_name
print *, 'coordinates%attr_name: "', coordinates%attr_name, '"'
end program test_create_single
When I compile and run it, I get:
$ nvfortran test_create_single.f90
$ a.out
attr_name: "units"
coordinates%attr_name: "un"
I should get:
coordinates%attr_name: "units"
I think this is a compiler bug. Would you correct this?
Sincerely.