* gcc.dg/nest.c: New.
From-SVN: r55546
This commit is contained in:
parent
99bcb625a1
commit
85272855b5
2 changed files with 25 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
2002-07-18 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* gcc.dg/nest.c: New.
|
||||
|
||||
2002-07-17 Eric Botcazou <ebotcazou@multimania.com>
|
||||
|
||||
* gcc.c-torture/execute/loop-2e.x: Let the testcase
|
||||
|
|
21
gcc/testsuite/gcc.dg/nest.c
Normal file
21
gcc/testsuite/gcc.dg/nest.c
Normal file
|
@ -0,0 +1,21 @@
|
|||
/* PR 5967, PR 7114 */
|
||||
/* { dg-do run } */
|
||||
/* { dg-options "-O2 -pg" } */
|
||||
|
||||
long foo (long x)
|
||||
{
|
||||
long i, sum = 0;
|
||||
long bar (long z) { return z * 2; }
|
||||
|
||||
for (i = 0; i < x; i++)
|
||||
sum += bar (i);
|
||||
|
||||
return sum;
|
||||
}
|
||||
|
||||
int main (void)
|
||||
{
|
||||
if (foo(10) != 90)
|
||||
abort ();
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Reference in a new issue