URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 298 |
Rev 384 |
/* PR tree-optimization/29738. We used not to realize that "i" can never
|
/* PR tree-optimization/29738. We used not to realize that "i" can never
|
become nonzero. */
|
become nonzero. */
|
|
|
/* { dg-do compile } */
|
/* { dg-do compile } */
|
/* { dg-options "-O2 -fdump-tree-optimized" } */
|
/* { dg-options "-O2 -fdump-tree-optimized" } */
|
|
|
int i;
|
int i;
|
|
|
void foo (void);
|
void foo (void);
|
void bar (void)
|
void bar (void)
|
{
|
{
|
int j;
|
int j;
|
i = 0;
|
i = 0;
|
for (j = 0; j < 10000; j++)
|
for (j = 0; j < 10000; j++)
|
if (i)
|
if (i)
|
foo ();
|
foo ();
|
}
|
}
|
|
|
/* Everything except for the "i = 0" assignment should get removed. */
|
/* Everything except for the "i = 0" assignment should get removed. */
|
/* { dg-final { scan-tree-dump-times "if" 0 "optimized" { xfail *-*-* } } } */
|
/* { dg-final { scan-tree-dump-times "if" 0 "optimized" { xfail *-*-* } } } */
|
/* { dg-final { cleanup-tree-dump "optimized" } } */
|
/* { dg-final { cleanup-tree-dump "optimized" } } */
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.