OSDN Git Service

2008-05-26 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / pr36300-1.c
1 /* { dg-do run } */
2 /* { dg-options "-O2 -fwrapv" } */
3
4 extern void abort (void);
5
6 #define VALUE ((int)((long long)U1 * (long long)3) + 2)
7
8 int main(void)
9 {
10   int U1;
11   long long Y, Y2;
12   int t;
13
14   U1 = -2147483647-1;
15
16   Y = ((long long)(VALUE * VALUE) * 3);
17
18   t = VALUE;
19   Y2 = ((long long)(t * t) * 3);
20
21   if (Y != Y2)
22     abort ();
23   return 0;
24 }