(root)/
gcc-13.2.0/
gcc/
testsuite/
c-c++-common/
pr85822.c
       1  /* { dg-options "-O2" } */
       2  /* { dg-do run } */
       3  
       4  static const long long int TagTypeNumber = 0xffff000000000000ll;
       5  
       6  long long int x;
       7  
       8  void foo(void)
       9  {
      10    x = TagTypeNumber + 1;
      11  }
      12  
      13  int main(int argc, char **argv)
      14  {
      15    if (argc > 0)
      16      foo ();
      17  
      18    if ((x & TagTypeNumber) == TagTypeNumber)
      19    {
      20      unsigned y = (unsigned)x;
      21      __builtin_printf ("v: %u\n", y);
      22      if (y != 1)
      23        __builtin_abort ();
      24    }
      25  
      26    return 0;
      27  }