summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/gcc.dg/20030323-1.c
blob: 8a563ec5eb21f09740b32c94c1145cb0f37a10fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* { dg-do run } */

/* PR c/8224 */
/* Contributed by Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> */

extern void abort (void);

unsigned f (int x)
{
  return (unsigned) (x / 2) / 2;
}

unsigned f1 (int x)
{
  unsigned xx = x / 2;
  return xx / 2;
}

int main ()
{
  if (f1 (-5) != f (-5))
    abort ();
  return 0;
}
OpenPOWER on IntegriCloud