blob: afba95521b390ebb10576d64193a51820a61d738 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
/* { dg-do compile } */
/* { dg-options "-O2" } */
void abort(void) __attribute__((__noreturn__));
typedef struct {
int container;
} edge_iterator;
struct ls_expr
{
int index;
int stores;
struct ls_expr * next;
};
struct ls_expr * pre_ldst_mems;
edge_iterator ei;
void
store_motion (void)
{
struct ls_expr * ptr, **prev_next_ptr_ptr;
edge_iterator ei1;
edge_iterator ei2;
int a = ptr != ((void *)0);
for (ptr = pre_ldst_mems, prev_next_ptr_ptr = &pre_ldst_mems;
ptr != ((void *)0);
ptr = *prev_next_ptr_ptr)
if (!((ptr)->stores))
*prev_next_ptr_ptr = ptr->next;
else
prev_next_ptr_ptr = &ptr->next;
for (ptr = pre_ldst_mems; ptr != 0; ptr = ptr->next)
;
ei1 = ei;
ei2 = ei1;
if (!ei2.container)
abort ();
ei2 = ei1;
if (!ei2.container)
abort ();
}
|