Open yus3710-fj opened 6 months ago
@llvm/issue-subscribers-openmp
Author: Yusuke MINATO (yus3710-fj)
@llvm/issue-subscribers-flang-frontend
Author: Yusuke MINATO (yus3710-fj)
Could you please check now, current flang-new seems to throw semantic errors(expected): https://godbolt.org/z/zsqxGvxo1
Thank you for the information.
Your test code includes PROGRAM
statement. Flang-new had already worked as expected for such a code even before I reported this issue. However, flang-new hasn't worked for the original program I wrote in the description yet.
@Thirumalai-Shaktivel [AMD] is looking into this issue.
This issue is fixed and is under internal review.
I get the following error, Hope it is intended
$ flang-new x.f90 -fopenmp
error: Semantic errors in x.f90
./x.f90:2:23: error: 'b' is a data object and may not be EXTERNAL
!$omp threadprivate(a,b)
^
./x.f90:3:20: error: The type of 'a' has already been implicitly declared
integer,pointer :: a
^
./x.f90:2:21: Implicit declaration of 'a'
!$omp threadprivate(a,b)
^
./x.f90:5:10: error: EXTERNAL attribute not allowed on 'b'
external b ! function references can't be threadprivate variables
^
./x.f90:2:23: Implicit declaration of 'b'
!$omp threadprivate(a,b)
^
This is an issue from Fujitsu testsuite.
Flang-new terminates abnormally when compiling a
threadprivate
directive with wrong arguments.The following are the test program and the compilation results of flang-new and gfortran. (I believe function references can't be threadprivate variables, but gfortran-13.2 seems to accept it.)