Wattributes-10.c: Add -fno-common option on hppa*-*-hpux*.
[official-gcc.git] / gcc / testsuite / c-c++-common / rotate-1a.c
blob07f65e54098eafcdd7f8c736bd0f0ac37ea60813
1 /* { dg-do run } */
2 /* { dg-options "-O2 -Wno-overflow" } */
4 extern
5 #ifdef __cplusplus
6 "C"
7 #endif
8 void abort (void);
10 #ifndef ROTATE_N
11 #define ROTATE_N "rotate-1.c"
12 #endif
14 #include ROTATE_N
16 unsigned int expected[] = {
17 0x91a2b3c0, 0x91a2b3c0, 0x2468acf0, 0x91a2b3c, 0xb3c2, 0xb3c2, 0xc3, 0xc3,
18 0x91a2b3c0, 0x91a2b3c0, 0x2468acf0, 0x91a2b3c, 0xb3c2, 0xb3c2, 0xc3, 0xc3,
19 0x91a2b3c0, 0x91a2b3c0, 0x2468acf0, 0x91a2b3c, 0xb3c2, 0xb3c2, 0xc3, 0xc3,
20 0x91a2b3c0, 0x91a2b3c0, 0x2468acf0, 0x91a2b3c, 0xb3c2, 0xb3c2, 0xc3, 0xc3,
21 0x2468acf, 0x2468acf, 0x91a2b3c, 0x2468acf0, 0xacf, 0xacf, 0xf, 0xf,
22 0x2468acf, 0x2468acf, 0x91a2b3c, 0x2468acf0, 0xacf, 0xacf, 0xf, 0xf,
23 0x2468acf, 0x2468acf, 0x91a2b3c, 0x2468acf0, 0xacf, 0xacf, 0xf, 0xf,
24 0x2468acf, 0x2468acf, 0x91a2b3c, 0x2468acf0, 0xacf, 0xacf, 0xf, 0xf,
25 0x91a2b3c0, 0x91a2b3c0, 0x2468acf0, 0x91a2b3c, 0xb3c2, 0xb3c2, 0xc3, 0xc3,
26 0x91a2b3c0, 0x91a2b3c0, 0x2468acf0, 0x91a2b3c, 0xb3c2, 0xb3c2, 0xc3, 0xc3,
27 0x2468acf, 0x2468acf, 0x91a2b3c, 0x2468acf0, 0xacf, 0xacf, 0xf, 0xf,
28 0x2468acf, 0x2468acf, 0x91a2b3c, 0x2468acf0, 0xacf, 0xacf, 0xf, 0xf };
30 #define F(n) __typeof (f##n) f##n __attribute__((noinline, noclone));
31 #define D(n) F(n##0) F(n##1) F(n##2) F(n##3) F(n##4) F(n##5) F(n##6) F(n##7) F(n##8) F(n##9)
32 #define ALL \
33 F(1) F(2) F(3) F(4) F(5) F(6) F(7) F(8) F(9) \
34 D(1) D(2) D(3) D(4) D(5) D(6) D(7) D(8) \
35 F(90) F(91) F(92) F(93) F(94) F(95) F(96)
36 ALL
38 int
39 main ()
41 #if __CHAR_BIT__ != 8 || __SIZEOF_SHORT__ != 2 || __SIZEOF_INT__ != 4
42 return 0;
43 #else
44 #undef F
45 #define F(n) if ((unsigned int) f##n (0x12345678U, 3) != expected[n - 1]) abort ();
46 ALL
47 return 0;
48 #endif