Mercurial > hg > CbC > CbC_llvm
annotate clang/test/CodeGenCUDA/device-init-fun.cu @ 266:00f31e85ec16 default tip
Added tag current for changeset 31d058e83c98
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 14 Oct 2023 10:13:55 +0900 |
parents | 1d019706d866 |
children |
rev | line source |
---|---|
150 | 1 // REQUIRES: amdgpu-registered-target |
2 | |
3 // RUN: %clang_cc1 -triple amdgcn -fcuda-is-device -std=c++11 \ | |
4 // RUN: -fgpu-allow-device-init -x hip \ | |
5 // RUN: -fno-threadsafe-statics -emit-llvm -o - %s \ | |
6 // RUN: | FileCheck %s | |
7 | |
8 #include "Inputs/cuda.h" | |
9 | |
10 // CHECK: define internal amdgpu_kernel void @_GLOBAL__sub_I_device_init_fun.cu() #[[ATTR:[0-9]*]] | |
11 // CHECK: attributes #[[ATTR]] = {{.*}}"device-init" | |
12 | |
13 __device__ void f(); | |
14 | |
15 struct A { | |
16 __device__ A() { f(); } | |
17 }; | |
18 | |
19 __device__ A a; |