blob: 422b516552bdbff2c2768fc44ceac39457dd299f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK):
RWStructuredBuffer<float> buf;
//
// This test checks that we correctly diagnose trying to use the address of
// something without one
//
int foo(const int constParam)
{
return spirv_asm
{
OpLoad $$int %foo &buf;
// CHECK: bad-addr.slang([[#@LINE-1]]): note {{.*}}: unable to take the address of this address-of asm operand
OpLoad $$int result &constParam;
// CHECK: bad-addr.slang([[#@LINE-1]]): note {{.*}}: unable to take the address of this address-of asm operand
};
}
|