URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 154 |
Rev 816 |
/* { dg-do compile } */
|
/* { dg-do compile } */
|
/* { dg-options "-O1 -fdump-tree-fab" } */
|
/* { dg-options "-O1 -fdump-tree-fab" } */
|
|
|
/* Check that we fold strlen of equally long strings, and that we do not
|
/* Check that we fold strlen of equally long strings, and that we do not
|
fail to terminate when there is a nontrivial cycle in the corresponding
|
fail to terminate when there is a nontrivial cycle in the corresponding
|
ssa graph. */
|
ssa graph. */
|
|
|
extern __SIZE_TYPE__ strlen (const char *);
|
extern __SIZE_TYPE__ strlen (const char *);
|
|
|
void foo(int i)
|
void foo(int i)
|
{
|
{
|
char *s = "abcde";
|
char *s = "abcde";
|
|
|
if (i)
|
if (i)
|
{
|
{
|
s = "defgh";
|
s = "defgh";
|
goto middle;
|
goto middle;
|
}
|
}
|
|
|
start:
|
start:
|
|
|
bla ();
|
bla ();
|
|
|
middle:
|
middle:
|
|
|
if (bla ())
|
if (bla ())
|
goto start;
|
goto start;
|
|
|
bar (strlen (s));
|
bar (strlen (s));
|
}
|
}
|
|
|
/* There should be no calls to strlen. */
|
/* There should be no calls to strlen. */
|
/* { dg-final { scan-tree-dump-times "strlen" 0 "fab"} } */
|
/* { dg-final { scan-tree-dump-times "strlen" 0 "fab"} } */
|
/* { dg-final { cleanup-tree-dump "fab" } } */
|
/* { dg-final { cleanup-tree-dump "fab" } } */
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.