2014-12-05 04:38:18 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
|
|
|
|
|
|
#include "Inputs/cuda.h"
|
|
|
|
|
2014-12-06 02:03:58 +08:00
|
|
|
__attribute__((amdgpu_num_vgpr(64)))
|
|
|
|
__global__ void test_num_vgpr() { } // expected-error {{'amdgpu_num_vgpr' attribute only applies to kernel functions}}
|
2014-12-05 04:38:18 +08:00
|
|
|
|
2014-12-06 02:03:58 +08:00
|
|
|
__attribute__((amdgpu_num_sgpr(32)))
|
|
|
|
__global__ void test_num_sgpr() { } // expected-error {{'amdgpu_num_sgpr' attribute only applies to kernel functions}}
|
2014-12-05 04:38:18 +08:00
|
|
|
|
2014-12-06 02:03:58 +08:00
|
|
|
// fixme-expected-error@+3 {{'amdgpu_num_sgpr' attribute only applies to kernel functions}}
|
|
|
|
// expected-error@+2 {{'amdgpu_num_vgpr' attribute only applies to kernel functions}}
|
2014-12-05 04:38:18 +08:00
|
|
|
__attribute__((amdgpu_num_sgpr(32), amdgpu_num_vgpr(64)))
|
|
|
|
__global__ void test_num_vgpr_num_sgpr() { }
|