1 /* Test to verify that VLAs are handled gracefully by -Wrestrict
3 { dg-options "-O2 -Wrestrict" }
4 { dg-require-effective-target alloca } */
6 typedef __SIZE_TYPE__
size_t;
8 #define memcpy(d, s, n) __builtin_memcpy (d, s, n)
9 #define strcpy(d, s) __builtin_strcpy (d, s)
11 void test_vla (void *d
, const char *s1
, const char *s2
, int i
, size_t n
)
19 memcpy (d
, i
? a
: b
, n
);
23 void test_vla_member (void *d
, const char *s1
, const char *s2
, int i
, size_t n
)
34 memcpy (d
, i
? s
.a
: s
.b
, n
);