Allow optional arguments to be used in the use_device OpenACC clause
Optional arguments should be treated as references rather than pointers
in the lowering. However, for non-present arguments, this would result
in a null dereference, so conditionals need to be added to detect and
handle this.
gcc/
* omp-low.c (lower_omp_target): For use_device clauses, generate
conditional statements to treat Fortran optional arguments like
references if non-null, or propogate null arguments into offloaded
code otherwise.
Reviewed-by: Julian Brown <julian@codesourcery.com>
(cherry picked from openacc-gcc-9-branch commit
4fba24cfbbd3738216a3551483744f82888741f3)