OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [20041122-1.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O1 -fstrict-aliasing -fdump-tree-fre" } */
3
 
4
__extension__ typedef __SIZE_TYPE__ size_t;
5
extern void *xmalloc (size_t) __attribute__ ((__malloc__));
6
struct edge_def
7
{
8
  struct basic_block_def *dest;
9
  int flags;
10
};
11
typedef struct edge_def *edge;
12
struct basic_block_def
13
{
14
  int flags;
15
};
16
typedef struct basic_block_def *basic_block;
17
extern int n_basic_blocks;
18
extern edge frob ();
19
basic_block *
20
find_unreachable_blocks (void)
21
{
22
  basic_block *tos, *worklist;
23
  tos = worklist = xmalloc (sizeof (basic_block) * n_basic_blocks);
24
  edge e = frob();
25
  if (!(e->dest->flags & 4))
26
    {
27
      e->dest->flags |= 4;
28
      *tos++ = e->dest;
29
    }
30
  return worklist;
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 if we can assert strict-aliasing rules.
36
   The net result is that we only need one load of e->dest.  */
37
/* { dg-final { scan-tree-dump-times "->dest" 1 "fre" } } */
38
/* { dg-final { cleanup-tree-dump "fre" } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.