gcc/testsuite/gcc.target/arm/pr40956.c
raw| 1 | /* { dg-options "-Os -fpic" } */ |
| 2 | /* { dg-require-effective-target fpic } */ |
| 3 | /* Make sure the constant "0" is loaded into register only once. */ |
| 4 | /* { dg-final { scan-assembler-times "movs?\[\\t \]*r., #0" 1 } } */ |
| 5 | |
| 6 | int foo(int p, int* q) |
| 7 | { |
| 8 | if (p!=9) |
| 9 | *q = 0; |
| 10 | else |
| 11 | *(q+1) = 0; |
| 12 | return 3; |
| 13 | } |