annotate gcc/testsuite/gcc.dg/overflow-1.c @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* PR optimization/13318 */
kono
parents:
diff changeset
2 /* Origin: <bremner@unb.ca> */
kono
parents:
diff changeset
3 /* Reduced testcase: Wolfgang Bangerth <bangerth@dealii.org> */
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 /* Verify that the big multiplier doesn't cause an integer
kono
parents:
diff changeset
6 overflow in the loop optimizer. */
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 /* { dg-do compile } */
kono
parents:
diff changeset
9 /* { dg-options "-O2" } */
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 struct S {
kono
parents:
diff changeset
12 int key;
kono
parents:
diff changeset
13 int rnext,rprev;
kono
parents:
diff changeset
14 };
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 void foo(struct S* H)
kono
parents:
diff changeset
17 {
kono
parents:
diff changeset
18 int i, k;
kono
parents:
diff changeset
19 for (i=0; i<2; i++){
kono
parents:
diff changeset
20 struct S* cell=H+k;
kono
parents:
diff changeset
21 cell->key=i*(0xffffffffUL/2);
kono
parents:
diff changeset
22 cell->rnext=k+(1-i);
kono
parents:
diff changeset
23 cell->rprev=k+(1-i);
kono
parents:
diff changeset
24 }
kono
parents:
diff changeset
25 }