[flang-dev] error: The DEFAULT(NONE) clause requires that 'real64' must be listed in a data-sharing attribute clause

Jeff Hammond via flang-dev flang-dev at lists.llvm.org
Tue Dec 14 11:39:07 PST 2021


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

Jeff

On Sat, Dec 11, 2021 at 9:50 PM Kiran Chandramohan <
Kiran.Chandramohan at arm.com> wrote:

> 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
> ------------------------------
> *From:* flang-dev <flang-dev-bounces at lists.llvm.org> on behalf of Jeff
> Hammond via flang-dev <flang-dev at lists.llvm.org>
> *Sent:* 10 December 2021 19:25
> *To:* flang-dev at lists.llvm.org <flang-dev at lists.llvm.org>
> *Subject:* [flang-dev] 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 at nuclear:~/PRK/FORTRAN$ gfortran -g -O3  -fopenmp
> transpose-openmp.F90 -o transpose-openmp && echo OK
>
> OK
>
> jhammond at nuclear:~/PRK/FORTRAN$ ifort -g -O3  -fopenmp
> transpose-openmp.F90 -o transpose-openmp && echo OK
>
> OK
>
> jhammond at nuclear:~/PRK/FORTRAN$ nvfortran -g -O3  -fopenmp
> transpose-openmp.F90 -o transpose-openmp && echo OK
>
> OK
>


-- 
Jeff Hammond
jeff.science at gmail.com
http://jeffhammond.github.io/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/flang-dev/attachments/20211214/2433122a/attachment.html>


More information about the flang-dev mailing list