1  /* PR rtl-optimization/102306 */
       2  /* Reported by Daniel Cederman <cederman@gaisler.com> */
       3  
       4  /* { dg-do compile } */
       5  /* { dg-require-effective-target ilp32 } */
       6  /* { dg-options "-O -mcpu=v8" } */
       7  
       8  extern void foo (void);
       9  
      10  void test (volatile unsigned char *a) 
      11  { 
      12    char b = *a;
      13    if (!b)
      14      return;
      15    if (b & 2)
      16      foo ();
      17  }
      18  
      19  /* { dg-final { scan-assembler-times "ldub" 1 } } */