Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.target / arm / bics_4.c
blob8dda11350c74c8cb98a8446c7dded46a1a5fd07a
1 /* { dg-do run } */
2 /* { dg-options "-O2 --save-temps -fno-inline" } */
3 /* { dg-require-effective-target arm32 } */
5 extern void abort (void);
7 int
8 bics_si_test1 (int a, int b, int c)
10 if ((a & b) == a)
11 return a;
12 else
13 return c;
16 int
17 bics_si_test2 (int a, int b, int c)
19 if ((a & b) == b)
20 return b;
21 else
22 return c;
25 int
26 main ()
28 int x;
29 x = bics_si_test1 (0xf00d, 0xf11f, 0);
30 if (x != 0xf00d)
31 abort ();
33 x = bics_si_test1 (0xf11f, 0xf00d, 0);
34 if (x != 0)
35 abort ();
37 x = bics_si_test2 (0xf00d, 0xf11f, 0);
38 if (x != 0)
39 abort ();
41 x = bics_si_test2 (0xf11f, 0xf00d, 0);
42 if (x != 0xf00d)
43 abort ();
45 return 0;
48 /* { dg-final { scan-assembler-times "bics\tr\[0-9\]+, r\[0-9\]+, r\[0-9\]+" 2 } } */