2008-03-21 Janne Blomqvist <jb@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gcc.dg / overflow-1.c
blobdb51a5ef129e4c97ceac2bd7f0536242549d5cef
1 /* PR optimization/13318 */
2 /* Origin: <bremner@unb.ca> */
3 /* Reduced testcase: Wolfgang Bangerth <bangerth@dealii.org> */
5 /* Verify that the big multiplier doesn't cause an integer
6 overflow in the loop optimizer. */
8 /* { dg-do compile } */
9 /* { dg-options "-O2" } */
11 struct S {
12 int key;
13 int rnext,rprev;
16 void foo(struct S* H)
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);