PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / arm / its.c
blobf81a0df51cdb5fc26208c0a99e5c1cfb2ee4ed04
1 /* { dg-do compile } */
2 /* { dg-require-effective-target arm_cortex_m } */
3 /* { dg-require-effective-target arm_thumb2 } */
4 /* { dg-options "-O2" } */
5 int test (int a, int b)
7 int r;
8 if (a > 10)
10 r = a - b;
11 r += 10;
13 else
15 r = b - a;
16 r -= 7;
18 if (r > 0)
19 r -= 3;
20 return r;
22 /* Ensure there is no IT block with more than 2 instructions, ie. we only allow
23 IT, ITT and ITE. */
24 /* { dg-final { scan-assembler-not "\\sit\[te\]{2}" } } */