(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
arm/
pr42574.c
       1  /* { dg-do compile { target { arm_thumb1_ok && { ! arm_thumb1_movt_ok } } } } */
       2  /* { dg-options "-mthumb -Os -fpic" }  */
       3  /* { dg-require-effective-target fpic } */
       4  /* Make sure the address of glob.c is calculated only once and using
       5     a logical shift for the offset (200<<1).  */
       6  /* { dg-final { scan-assembler-times "lsl" 1 } } */
       7  
       8  struct A {
       9   char a[400];
      10   float* c;
      11  };
      12  struct A glob;
      13  void func();
      14  void func1(float*);
      15  int func2(float*, int*);
      16  void func3(float*);
      17  
      18  void test(int *p) {
      19   func1(glob.c);
      20   if (func2(glob.c, p)) {
      21     func();
      22   }
      23   func3(glob.c);
      24  }