On Fri, Jul 05, 2019 at 12:31:17PM +0100, Andrew Stubbs wrote: > This patch allows Fortran "parameter" named constants to be named in OpenMP > map and OpenACC copy directives. > > Right now, the compiler just says something like: > > !$omp target data map(tofrom:N,x) > 1 > Error: Object 'n' is not a variable at (1) > > This is technically correct, but is surprising to the user and AFAICT the > OpenMP/OpenACC documents don't say you can't name parameters, so I'd like it > to be allowed.
I don't think you can do it in OpenMP, I can discuss in the language committee, but the definition of variable is: "A named data storage block, for which the value can be defined and redefined during the execution of a program." so I don't believe Fortran parameters are OpenMP variables. Scalar Fortran parameters don't even have any data storage block associated with them at all. Jakub