OSDN Git Service

gcc:
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tree-ssa / 20041122-1.c
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-dom3" } */
3
4
5 typedef unsigned int size_t;
6 extern void *xmalloc (size_t) __attribute__ ((__malloc__));
7 struct edge_def
8 {
9   struct basic_block_def *dest;
10   int flags;
11 };
12 typedef struct edge_def *edge;
13 struct basic_block_def
14 {
15   int flags;
16 };
17 typedef struct basic_block_def *basic_block;
18 extern int n_basic_blocks;
19 extern edge frob ();
20 void
21 find_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" } } */