2 /* Testcase by George Thopas <george.thopas@gmail.com> */
4 /* { dg-do compile } */
5 /* { dg-require-effective-target alloca } */
11 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
12 #define REV_ENDIANNESS __attribute__((scalar_storage_order("big-endian")))
14 #define REV_ENDIANNESS __attribute__((scalar_storage_order("little-endian")))
21 typedef struct s_1 t_1
;
27 typedef struct s_2 t_2
;
34 typedef struct s12 t_s12
;
41 typedef union u12 t_u12
;
45 t_s12
*msg1
= __builtin_alloca(10);
46 t_u12
*msg2
= __builtin_alloca(10);
49 msg1
= malloc (sizeof (t_s12
));
50 msg2
= malloc (sizeof (t_s12
));
52 memset (msg1
, 0, sizeof (t_s12
));
53 memcpy (msg2
, msg1
, sizeof (t_s12
));
54 same
= memcmp (msg1
, msg2
, sizeof (t_s12
));