* gcc.dg/tree-ssa/20041122-1.c: New test for missing optimization.

From-SVN: r95332
This commit is contained in:
Jeff Law 2005-02-21 07:55:38 -07:00 committed by Jeff Law
parent a4de48bc6c
commit 40cd9e66fa
2 changed files with 43 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2005-01-31 Jeff Law <law@redhat.com>
* gcc.dg/tree-ssa/20041122-1.c: New test for missing optimization.
2005-02-20 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
* gfortran.dg/do_iterator: Split loop, markup all lines for

View File

@ -0,0 +1,39 @@
/* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-dom3" } */
typedef unsigned int size_t;
extern void *xmalloc (size_t) __attribute__ ((__malloc__));
struct edge_def
{
struct basic_block_def *dest;
int flags;
};
typedef struct edge_def *edge;
struct basic_block_def
{
int flags;
};
typedef struct basic_block_def *basic_block;
extern int n_basic_blocks;
extern edge frob ();
void
find_unreachable_blocks (int frobit)
{
basic_block *tos, *worklist, bb;
tos = worklist = xmalloc (sizeof (basic_block) * n_basic_blocks);
edge e = frob();
if (!(e->dest->flags & 4))
{
e->dest->flags |= 4;
*tos++ = e->dest;
}
}
/* If the aliasing code does its job properly, then we should be
able to determine that modifying e->dest->flags does not
modify e or e->dest. The net result is that we only need one
load of e->dest. */
/* { dg-final { scan-tree-dump-times "->dest" 1 "dom3" { xfail *-*-* } } } */