The following code ICEs with nvfortran 21.5:
character(8) :: x
print *, [character(len(x(1:2))) :: 'a', 'b']
end
% nvfortran pr100950.f90
NVFORTRAN-S-0000-Internal compiler error. size_of: attempt to size assumed size character 0 (pr100950.f90: 2)
NVFORTRAN-S-0000-Internal compiler error. size_of: attempt to size assumed size character 0 (pr100950.f90: 2)
0 inform, 0 warnings, 2 severes, 0 fatal for MAIN
The code compiles with NAG and Intel (and currently ICEs also with gfortran).
% nvfortran -V
nvfortran 21.5-0 LLVM 64-bit target on x86-64 Linux -tp haswell
NVIDIA Compilers and Tools
Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.