/* Do not warn for built-in functions, for example memcpy, since we
control how they behave and they can be useful in this area. */
if (TREE_CODE (rname) != FUNCTION_DECL
- || !DECL_IS_UNDECLARED_BUILTIN (rname))
+ || !fndecl_built_in_p (rname))
warning_at (location, OPT_Wscalar_storage_order,
"passing argument %d of %qE from incompatible "
"scalar storage order", parmnum, rname);
#include <stddef.h>
#include <stdlib.h>
+#include <string.h>
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#define REV_ENDIANNESS __attribute__((scalar_storage_order("big-endian")))
{
t_s12 *msg1 = __builtin_alloca(10);
t_u12 *msg2 = __builtin_alloca(10);
+ int same;
msg1 = malloc (sizeof (t_s12));
msg2 = malloc (sizeof (t_u12));
- msg1->a[0].val = 0;
- msg2->a[0].val = 0;
+ memset (msg1, 0, sizeof (t_s12));
+ memcpy (msg2, &msg1, sizeof (t_s12));
+ same = memcmp (msg1, msg2, sizeof (t_s12));
return 0;
}