(root)/
gcc-13.2.0/
gcc/
testsuite/
c-c++-common/
ubsan/
pr80349.c
       1  /* PR sanitizer/80349 */
       2  /* { dg-do compile } */
       3  /* { dg-options "-fsanitize=undefined" } */
       4  
       5  int var;
       6  long a;
       7  
       8  long
       9  fn1 ()
      10  {
      11    return 0 % ((a & 1) == (7UL & 1));
      12  }
      13  
      14  long
      15  fn2 ()
      16  {
      17    return 0 % ((a & 1) == (1 & 7UL));
      18  }
      19  
      20  long
      21  fn3 ()
      22  {
      23    return 0 % ((1 & a) == (7UL & 1));
      24  }
      25  
      26  long
      27  fn4 ()
      28  {
      29    return 0 % ((1 & a) == (1 & 7UL));
      30  }