blob: ead89228060f6779391e382ba6ad3a83b4e5ce15 [file] [log] [blame]
/* PR tree-optimization/86844 */
__attribute__((noipa)) void
foo (int *p)
{
*p = 0;
*((char *)p + 3) = 1;
*((char *)p + 1) = 2;
*((char *)p + 2) = *((char *)p + 6);
}
int
main ()
{
int a[2] = { -1, 0 };
if (sizeof (int) != 4)
return 0;
((char *)a)[6] = 3;
foo (a);
if (((char *)a)[0] != 0 || ((char *)a)[1] != 2
|| ((char *)a)[2] != 3 || ((char *)a)[3] != 1)
__builtin_abort ();
return 0;
}