aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/arm/pr40956.c
blob: 167cdc6ece0853cb814bcad1b30aeab2b69b791b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* { dg-options "-Os -fpic" }  */
/* { dg-require-effective-target fpic } */
/* Make sure the constant "0" is loaded into register only once.  */
/* { dg-final { scan-assembler-times "mov\[\\t \]*r., #0" 1 } } */

int foo(int p, int* q)
{
  if (p!=9)
    *q = 0;
  else
    *(q+1) = 0;
  return 3;
}