(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.c-torture/
execute/
20050224-1.c
       1  /* Origin: Mikael Pettersson <mikpe@csd.uu.se> and the Linux kernel.  */
       2  
       3  extern void abort (void);
       4  unsigned long a = 0xc0000000, b = 0xd0000000;
       5  unsigned long c = 0xc01bb958, d = 0xc0264000;
       6  unsigned long e = 0xc0288000, f = 0xc02d4378;
       7  
       8  void
       9  foo (int x, int y, int z)
      10  {
      11    if (x != 245 || y != 36 || z != 444)
      12      abort ();
      13  }
      14  
      15  int
      16  main (void)
      17  {
      18    unsigned long g;
      19    int h = 0, i = 0, j = 0;
      20  
      21    if (sizeof (unsigned long) < 4)
      22      return 0;
      23  
      24    for (g = a; g < b; g += 0x1000)
      25      if (g < c)
      26        h++;
      27      else if (g >= d && g < e)
      28        j++;
      29      else if (g < f)
      30        i++;
      31    foo (i, j, h);
      32    return 0;
      33  }