Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Flang][OpenMP] OpenMP directive DEFAULT (NONE) is set, but a compilation-time error occurs indicating that the variable does not specify data-sharing attribute. #110442

Open
ohno-fj opened this issue Sep 29, 2024 · 1 comment · May be fixed by #112963
Assignees

Comments

@ohno-fj
Copy link

ohno-fj commented Sep 29, 2024

Version of flang-new : 20.0.0(2603c8b23be06116bc61bda36fae05b81d906c3f)/AArch64

When building CP2K, the following error is detected.
OpenMP directive DEFAULT (NONE) is set, but a compilation-time error occurs indicating that the variable does not specify data-sharing attribute.

The following are a self-made reproducer, Flang-new compilation result.

z1.f90:

subroutine sub( aaa)
  real,dimension(*),intent(in)::aaa
  integer::ip
  real::ccc
!$omp parallel do private(ip,ccc) default(none)
  do ip = 1, 10
     ccc= aaa(ip)
  end do
end subroutine sub

program main
  real::arg(10)
  arg=1.0
  print *,'pass'
end program main
$ flang-new -fopenmp z1.f90
error: Semantic errors in z1.f90
./z1.f90:7:11: error: The DEFAULT(NONE) clause requires that 'aaa' must be listed in a data-sharing attribute clause
       ccc= aaa(ip)
            ^^^
$
@EugeneZelenko EugeneZelenko added the clang:frontend Language frontend issues, e.g. anything involving "Sema" label Sep 30, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Sep 30, 2024

@llvm/issue-subscribers-clang-frontend

Author: None (ohno-fj)

``` Version of flang-new : 20.0.0(2603c8b)/AArch64 ```

When building CP2K, the following error is detected.
OpenMP directive DEFAULT (NONE) is set, but a compilation-time error occurs indicating that the variable does not specify data-sharing attribute.

The following are a self-made reproducer, Flang-new compilation result.

z1.f90:

subroutine sub( aaa)
  real,dimension(*),intent(in)::aaa
  integer::ip
  real::ccc
!$omp parallel do private(ip,ccc) default(none)
  do ip = 1, 10
     ccc= aaa(ip)
  end do
end subroutine sub

program main
  real::arg(10)
  arg=1.0
  print *,'pass'
end program main
$ flang-new -fopenmp z1.f90
error: Semantic errors in z1.f90
./z1.f90:7:11: error: The DEFAULT(NONE) clause requires that 'aaa' must be listed in a data-sharing attribute clause
       ccc= aaa(ip)
            ^^^
$

@kiranchandramohan kiranchandramohan self-assigned this Oct 3, 2024
@kiranchandramohan kiranchandramohan removed the clang:frontend Language frontend issues, e.g. anything involving "Sema" label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants