Skip to content

[flang][OpenMP] DECLARE SIMD LINEAR implicitly declaring a variable #140754

Closed
@tblah

Description

@tblah

https://github.com/fujitsu/compiler-test-suite/blob/ac5d63a278b47141b51e12bd7ec3b189177d63e9/Fortran/0683/0683_0009.f90

module mod
contains
subroutine sub(m,i)
!$omp declare simd linear(i:1)
  implicit none
  integer*8 i,n
  value i
  parameter(n=10000)
  real*4 a,b,m
  common/com1/a(n)
  common/com2/b(n)
  a(i) = b(i) + m
  i=i+2
end subroutine
end module

Reproduce with flang -fopenmp.

Currently this causes an error: error: The type of 'i' has already been delcared on the declaration of i. It is wrong that the LINEAR clause is implicitly defining the symbol. This should wait until after the symbol has been resolved for the fortran declaration and then use that.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions