* gcc.c-torture/execute/comp-goto-2.c: New test.

From-SVN: r38447
This commit is contained in:
Alexandre Oliva 2000-12-22 08:50:26 +00:00 committed by Alexandre Oliva
parent 4f50715ce0
commit 292b48db28
2 changed files with 40 additions and 0 deletions

View File

@ -1,3 +1,7 @@
Fri Dec 22 06:45:03 2000 Alexandre Oliva <aoliva@redhat.com>
* gcc.c-torture/execute/comp-goto-2.c: New test.
Thu Dec 21 22:43:03 2000 J"orn Rennecke <amylaar@redhat.com>
* gcc.c-torture/execute/comp-goto-1.c (uint32, sint32):

View File

@ -0,0 +1,36 @@
/* A slight variation of 920501-7.c. */
#ifdef STACK_SIZE
#define DEPTH ((STACK_SIZE) / 512 + 1)
#else
#define DEPTH 1000
#endif
#if ! defined (NO_LABEL_VALUES) && !defined (NO_TRAMPOLINES)
x(a)
{
__label__ xlab;
void y(a)
{
void *x = &&llab;
if (a==-1)
goto *x;
if (a==0)
goto xlab;
llab:
y (a-1);
}
y (a);
xlab:;
return a;
}
#endif
main ()
{
#if ! defined (NO_LABEL_VALUES) && !defined (NO_TRAMPOLINES)
if (x (DEPTH) != DEPTH)
abort ();
#endif
exit (0);
}