gcc/testsuite/gcc.target/arm/pure-code/ffunction-sections.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-skip-if "" { *-*-* } { "-fpic" "-fPIC" } { "" } } */ |
| 3 | /* { dg-options "-ffunction-sections -mpure-code" } */ |
| 4 | #include <limits.h> |
| 5 | |
| 6 | char * foo (void) |
| 7 | { |
| 8 | return "foo"; |
| 9 | } |
| 10 | |
| 11 | unsigned int bar (unsigned int b) |
| 12 | { |
| 13 | return UINT_MAX - b; |
| 14 | } |
| 15 | |
| 16 | /* { dg-final { scan-assembler {\.section\t\.text\.foo[^\n]*\"0x20000006\"} } } */ |
| 17 | /* { dg-final { scan-assembler {\.section\t\.text\.bar[^\n]*\"0x20000006\"} } } */ |