Files
Amit Tiwari 3c14034c55 [Flang][OpenMP] Validate omp_initial_device omp_invalid_device as device IDs (#193669)
As per OpenMP 5.2/6.0 the below are valid device values in a `#pragma
omp target` directive:

omp_initial_device (-1) -> refers to the host CPU.
omp_invalid_device (-2) -> an intentionally invalid device, used to
trigger a runtime error.

For the 2 values discussed above flang fails with:

```
error: The device expression of the DEVICE clause must be a positive integer expression
      !$OMP TARGET DEVICE(-1)
error: Must have INTEGER type, but is REAL(4)
      !$OMP TARGET DEVICE(OMP_INVALID_DEVICE)

```
Issue: https://github.com/llvm/llvm-project/issues/192989
2026-04-28 21:31:04 +05:30
..