1/* PR optimization/13318 */ 2/* Origin: <bremner@unb.ca> */ 3/* Reduced testcase: Wolfgang Bangerth <bangerth@dealii.org> */ 4 5/* Verify that the big multiplier doesn't cause an integer 6 overflow in the loop optimizer. */ 7 8/* { dg-do compile } */ 9/* { dg-options "-O2" } */ 10 11struct S { 12 int key; 13 int rnext,rprev; 14}; 15 16void foo(struct S* H) 17{ 18 int i, k; 19 for (i=0; i<2; i++){ 20 struct S* cell=H+k; 21 cell->key=i*(0xffffffffUL/2); 22 cell->rnext=k+(1-i); 23 cell->rprev=k+(1-i); 24 } 25} 26