Antonio Maiorano | 08d9279 | 2024-01-11 20:51:50 +0000 | [diff] [blame] | 1 | #include <metal_stdlib> |
2 | |||||
3 | using namespace metal; | ||||
4 | struct S { | ||||
5 | int x; | ||||
6 | }; | ||||
7 | |||||
8 | void deref() { | ||||
9 | S a = {}; | ||||
10 | int b = a.x; | ||||
11 | a.x = 42; | ||||
12 | } | ||||
13 | |||||
14 | void no_deref() { | ||||
15 | S a = {}; | ||||
16 | int b = a.x; | ||||
17 | a.x = 42; | ||||
18 | } | ||||
19 | |||||
20 | kernel void tint_symbol() { | ||||
21 | deref(); | ||||
22 | no_deref(); | ||||
23 | return; | ||||
24 | } | ||||
25 |