1/* { dg-require-effective-target int32plus } */ 2struct X { 3 char fill0[800000]; 4 int a; 5 char fill1[900000]; 6 int b; 7}; 8 9int __attribute__((noinline,noclone)) 10Avg(struct X *p, int s) 11{ 12 return (s * (long long)(p->a + p->b)) >> 17; 13} 14 15struct X x; 16 17int 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 26