Issue 140754
Summary [flang][OpenMP] DECLARE SIMD LINEAR implicitly declaring a variable
Labels flang
Assignees
Reporter 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.


_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to