comparison gcc/testsuite/gcc.c-torture/execute/pr60822.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* { dg-require-effective-target int32plus } */
2 struct X {
3 char fill0[800000];
4 int a;
5 char fill1[900000];
6 int b;
7 };
8
9 int __attribute__((noinline,noclone))
10 Avg(struct X *p, int s)
11 {
12 return (s * (long long)(p->a + p->b)) >> 17;
13 }
14
15 struct X x;
16
17 int main()
18 {
19 x.a = 1 << 17;
20 x.b = 2 << 17;
21 if (Avg(&x, 1) != 3)
22 __builtin_abort();
23 return 0;
24 }
25