gcc/testsuite/gcc.target/arm/attr_thumb-static.c
raw| 1 | /* Check that a change mode to a static function is correctly handled. */ |
| 2 | /* { dg-do run } */ |
| 3 | |
| 4 | static void |
| 5 | __attribute__((__noinline__)) |
| 6 | foo (void) |
| 7 | { |
| 8 | __asm__ (""); |
| 9 | } |
| 10 | |
| 11 | static void |
| 12 | __attribute__((__noinline__)) |
| 13 | __attribute__((target("thumb"))) |
| 14 | bar (void) |
| 15 | { |
| 16 | __asm__ (""); |
| 17 | } |
| 18 | |
| 19 | int |
| 20 | main (void) |
| 21 | { |
| 22 | foo(); |
| 23 | bar(); |
| 24 | return 0; |
| 25 | } |