1#include <gpuintrin.h>
2#include <stdint.h>
3
4uint32_t global[64];
5
6[[gnu::destructor]] void dtor() {
7 for (unsigned I = 0; I < 64; I++)
8 global[I] = 1;
9}
10
11__gpu_kernel void global_dtor() {
12 // no-op
13}
14

source code of offload/unittests/OffloadAPI/device_code/global_dtor.c