1/* { dg-do compile } */
2/* { dg-options "-O1 -fdump-tree-dom3" } */
3
4
5typedef unsigned int size_t;
6extern void *xmalloc (size_t) __attribute__ ((__malloc__));
7struct edge_def
8{
9  struct basic_block_def *dest;
10  int flags;
11};
12typedef struct edge_def *edge;
13struct basic_block_def
14{
15  int flags;
16};
17typedef struct basic_block_def *basic_block;
18extern int n_basic_blocks;
19extern edge frob ();
20void
21find_unreachable_blocks (int frobit)
22{
23  basic_block *tos, *worklist, bb;
24  tos = worklist = xmalloc (sizeof (basic_block) * n_basic_blocks);
25  edge e = frob();
26  if (!(e->dest->flags & 4))
27    {
28      e->dest->flags |= 4;
29      *tos++ = e->dest;
30    }
31}
32
33/* If the aliasing code does its job properly, then we should be
34   able to determine that modifying e->dest->flags does not
35   modify e or e->dest.  The net result is that we only need one
36   load of e->dest.  */
37/* { dg-final { scan-tree-dump-times "->dest" 1 "dom3" { xfail *-*-* } } } */
38/* { dg-final { cleanup-tree-dump "dom3" } } */
39