[flang][openacc] Fix device_num and device_type clauses for init directive
authorValentin Clement <clementval@gmail.com>
Wed, 7 Oct 2020 01:26:13 +0000 (21:26 -0400)
committerclementval <clementval@gmail.com>
Wed, 7 Oct 2020 01:27:01 +0000 (21:27 -0400)
commit2f40e20613758b3e11a15494c09f4b6973673d6b
treeb86e96f6a821b9952a6b17cc3b240aa982aedc20
parent7993d61177c8c6e9aa238e57a684c6cd3db3b571
[flang][openacc] Fix device_num and device_type clauses for init directive

This patch fix the device_num and device_type clauses used in the init clause. device_num was not
spelled correctly in the parser and was to restrictive with scalarIntConstantExpr instead of scalarIntExpr.
device_type is now taking a list of ScalarIntExpr.

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D88571
flang/lib/Parser/openacc-parsers.cpp
flang/test/Semantics/acc-clause-validity.f90
llvm/include/llvm/Frontend/OpenACC/ACC.td