2021-06-02 17:23:03 +00:00
|
|
|
#include <metal_stdlib>
|
|
|
|
|
|
|
|
using namespace metal;
|
2021-06-16 09:19:36 +00:00
|
|
|
struct tint_array_wrapper {
|
|
|
|
int arr[4];
|
2021-06-02 17:23:03 +00:00
|
|
|
};
|
|
|
|
struct S {
|
2021-06-16 09:19:36 +00:00
|
|
|
tint_array_wrapper arr;
|
2021-06-02 17:23:03 +00:00
|
|
|
};
|
|
|
|
struct tint_array_wrapper_1 {
|
2021-06-16 09:19:36 +00:00
|
|
|
tint_array_wrapper arr[2];
|
2021-06-02 17:23:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
void foo() {
|
2021-06-16 09:19:36 +00:00
|
|
|
tint_array_wrapper const src = {.arr={}};
|
|
|
|
tint_array_wrapper dst = {};
|
2021-06-02 17:23:03 +00:00
|
|
|
S dst_struct = {};
|
2021-06-16 09:19:36 +00:00
|
|
|
tint_array_wrapper_1 dst_array = {};
|
|
|
|
thread tint_array_wrapper* const dst_ptr = &(dst);
|
2021-06-02 17:23:03 +00:00
|
|
|
thread S* const dst_struct_ptr = &(dst_struct);
|
|
|
|
thread tint_array_wrapper_1* const dst_array_ptr = &(dst_array);
|
|
|
|
dst_struct.arr = src;
|
2021-06-16 09:19:36 +00:00
|
|
|
dst_array.arr[1] = src;
|
2021-06-02 17:23:03 +00:00
|
|
|
*(dst_ptr) = src;
|
|
|
|
(*(dst_struct_ptr)).arr = src;
|
2021-06-16 09:19:36 +00:00
|
|
|
(*(dst_array_ptr)).arr[0] = src;
|
2021-06-02 17:23:03 +00:00
|
|
|
}
|
|
|
|
|