1 // RUN: %clang_cc1 -triple x86_64-unknown-linux -ast-print %s -o - | FileCheck %s
3 typedef unsigned long int size_t;
11 int array
[] __attribute__((counted_by(count
)));
14 // CHECK-LABEL: void test1(struct fam_struct *ptr, int size) {
15 // CHECK-NEXT: size_t __ignored_assignment;
16 // CHECK-NEXT: *_Generic(__builtin_counted_by_ref(ptr->array), void *: &__ignored_assignment, default: __builtin_counted_by_ref(ptr->array)) = 42;
17 void test1(struct fam_struct
*ptr
, int size
) {
18 size_t __ignored_assignment
;
20 *_Generic(__builtin_counted_by_ref(ptr
->array
),
21 void *: &__ignored_assignment
,
22 default: __builtin_counted_by_ref(ptr
->array
)) = 42; // ok