(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
guality/
pr58791-1.c
       1  /* PR tree-optimization/58791 */
       2  /* { dg-do run } */
       3  /* { dg-options "-g" } */
       4  
       5  #include "../nop.h"
       6  
       7  __attribute__((noinline, noclone)) int
       8  foo (int x, int y)
       9  {
      10    _Bool a = x != 0;
      11    _Bool b = y != 2;
      12    _Bool c = a & b;
      13    _Bool d = !c;
      14    int ret;
      15    if (c)
      16      {
      17        if (y < 3 || y > 4)
      18  	ret = 1;
      19        else
      20  	ret = 0;
      21      }
      22    else
      23      ret = 0;
      24    asm volatile (NOP : : : "memory");	/* { dg-final { gdb-test pr58791-1.c:25 "c & 1" "1" } } */
      25    asm volatile (NOP : : : "memory");	/* { dg-final { gdb-test pr58791-1.c:25 "d & 1" "0" } } */
      26    return ret;
      27  }
      28  
      29  int
      30  main ()
      31  {
      32    foo (1, 3);
      33    return 0;
      34  }