| 1 |
/* Check that attribute target thumb is recognized. */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* Make sure the current multilib supports thumb. */ |
| 4 |
/* { dg-skip-if "" { ! { arm_thumb1_ok || arm_thumb2_ok } } } */ |
| 5 |
/* { dg-options "-O2 -mno-restrict-it" } */ |
| 6 |
/* { dg-final { scan-assembler-not "\\.arm" } } */ |
| 7 |
/* { dg-final { scan-assembler "\\.thumb_func" } } */ |
| 8 |
|
| 9 |
int __attribute__((target("thumb"))) |
| 10 |
foo(int a) |
| 11 |
{ |
| 12 |
/* { dg-final { scan-assembler "ite" { target { arm_thumb2_ok } } } } */ |
| 13 |
return a ? 1 : 5; |
| 14 |
} |
| 15 |
|