Shourya Goel b89eb9790a
[Clang][OpenMP] Fix `!isNull() && "Cannot retrieve a NULL type pointer"' fail. (#81015)
Fixes : #69085 , #69200

**PR SUMMARY**: "Added Null check for negative sized array and a test
for the same"
2024-02-07 13:38:22 -06:00

11 lines
216 B
C

// RUN: %clang_cc1 -verify -O0 -fopenmp-simd %s
int k[-1]; // expected-error {{'k' declared as an array with a negative size}}
void foo() {
#pragma omp task depend(inout: k [:])
{
k[0] = 1;
}
}