PR ipa/61602
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr50067-4.c
blob1571d72f11e804097a20745a740159ca36df4c1c
1 /* { dg-do run } */
3 /* Verify we do not get a bogus access function with 0B vs. 1B which
4 disambiguates both accesses and leads to vectorization. */
6 extern int memcmp(const void *, const void *, __SIZE_TYPE__);
7 extern void abort (void);
8 short a[33] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 };
9 short b[33] = { 0, };
10 int main()
12 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
13 int i;
14 if (sizeof (short) == 2)
16 for (i = 0; i < 64; ++i)
18 (*((char(*)[])&a[1]))[i] = (*((char(*)[])&a[0]))[i+1];
20 if (memcmp (&a, &b, sizeof (a)) != 0)
21 abort ();
23 #endif
24 return 0;