Error: The DEFAULT(NONE) clause requires that 'real64' must be listed in a data-sharing attribute clause

I built F18 from source a few hours ago.

I am surprised that it cannot see that REAL64 is an intrinsic value from the iso_fortran_env module the way gfortran, ifort and nvfortran do.

Do people agree this is a bug? If so, I’ll file it.

/usr/local/bin/flang -g -O3 -ffast-math -Wall -DRADIUS=2 -DSTAR -fopenmp -L/usr/local/lib transpose-openmp.F90 -o transpose-openmp

error: Semantic errors in transpose-openmp.F90

./transpose-openmp.F90:244:27: error: The DEFAULT(NONE) clause requires that ‘real64’ must be listed in a data-sharing attribute clause

temp = ((real(order,REAL64)*real(i-1,REAL64))+real(j-1,REAL64)) &

^^^^^^

./transpose-openmp.F90:244:44: error: The DEFAULT(NONE) clause requires that ‘real64’ must be listed in a data-sharing attribute clause

temp = ((real(order,REAL64)*real(i-1,REAL64))+real(j-1,REAL64)) &

^^^^^^

./transpose-openmp.F90:244:62: error: The DEFAULT(NONE) clause requires that ‘real64’ must be listed in a data-sharing attribute clause

temp = ((real(order,REAL64)*real(i-1,REAL64))+real(j-1,REAL64)) &

^^^^^^

./transpose-openmp.F90:245:32: error: The DEFAULT(NONE) clause requires that ‘real64’ must be listed in a data-sharing attribute clause

  • real(iterations+1,REAL64)

^^^^^^

jhammond@nuclear:~/PRK/FORTRAN$ gfortran -g -O3 -fopenmp transpose-openmp.F90 -o transpose-openmp && echo OK

OK

jhammond@nuclear:~/PRK/FORTRAN$ ifort -g -O3 -fopenmp transpose-openmp.F90 -o transpose-openmp && echo OK

OK

jhammond@nuclear:~/PRK/FORTRAN$ nvfortran -g -O3 -fopenmp transpose-openmp.F90 -o transpose-openmp && echo OK

OK

transpose-openmp.F90 (8.95 KB)

Hello Jeff,

Thanks for bringing this to our attention. This definitely looks like a bug. On a quick look, I think we are a bit too aggressive and look at all Names and do not restrict to variables.
https://github.com/llvm/llvm-project/blob/36b8a4f9f39c9d1b9cd6cae9aebc82cbdb37815b/flang/lib/Semantics/resolve-directives.cpp#L1478

Please file a bug in either of the following places.
https://github.com/llvm/llvm-project/issues

https://github.com/flang-compiler/f18-llvm-project/issues

Regards,
Kiran

Cool. https://github.com/flang-compiler/f18-llvm-project/issues/1346 is filed.

Jeff