OSDN Git Service

PR target/48496
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / arm / pr40956.c
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 "mov\[\\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 }