PSyclone
PSyclone copied to clipboard
Issues with range2loop expansion of string with (1:1)
Intel compiler doesn´t accept:
do idx = 1, 1, 1
cdltmp(idx) = ...
as a range2loop expansion of:
CHARACTER(LEN = ilenlong) :: cdltmp
cdltmp(1:1) = ACHAR(IACHAR(cdltmp(1 : 1)) + 32)
It produces:
NEMOGCM_V40/cfgs/SPITZ12_openmp_cpu/WORK/obs_fbm.f90(1024): error #6410: This name has not been declared as an array or a function. [CDLTMP]
cdltmp(idx) = ACHAR(IACHAR(cdltmp(idx)) + 32)
----------^
NEMOGCM_V40/cfgs/SPITZ12_openmp_cpu/WORK/obs_fbm.f90(1024): warning #7319: This argument's data type is incompatible with this intrinsic procedure; procedure assumed EXTERNAL. [IACHAR]
cdltmp(idx) = ACHAR(IACHAR(cdltmp(idx)) + 32)
-------------------------------------^
NEMOGCM_V40/cfgs/SPITZ12_openmp_cpu/WORK/obs_fbm.f90(1024): error #6404: This name does not have a type, and must have an explicit type. [IACHAR]
cdltmp(idx) = ACHAR(IACHAR(cdltmp(idx)) + 32)
------------------------------^
NEMOGCM_V40/cfgs/SPITZ12_openmp_cpu/WORK/obs_fbm.f90(1024): error #6303: The assignment operation or the binary expression operation is invalid for the data types of the two operands. [ACHAR]
cdltmp(idx) = ACHAR(IACHAR(cdltmp(idx)) + 32)
------------------------^
I think the validate method should reject this as a character sub-string does not imply a loop?
#2511 Fixes the issue when the array.datatype is an array of character type. But I will not close this issue yet because it is still a problem when the type is Unresolved or Unknown as is the case with CHARACTER(LEN = ilenlong) :: cdltmp or imported symbols