llvm-project/clang/test/OpenMP/amdgcn_debug_nowait.c
Abid Qadeer 62d0b712b7
[OMPIRBuilder] Avoid invalid debug location. (#153190)
Fixes #153043.

This is another case of debug location not getting updated when the
insert point is changed by the `restoreIP`. Fixed by using the wrapper
function that updates the debug location.
2025-08-12 16:20:52 +01:00

17 lines
328 B
C

// REQUIRES: amdgpu-registered-target
// RUN: %clang_cc1 -debug-info-kind=line-tables-only -fopenmp -triple x86_64-unknown-unknown -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm-bc %s -o %t-host.bc
int test() {
int c;
#pragma omp target data map(tofrom: c)
{
#pragma omp target nowait
{
c = 2;
}
}
return c;
}