* gcc.c-torture/execute/20021015-1.c: New test.

From-SVN: r58159
This commit is contained in:
Ulrich Weigand 2002-10-15 14:39:40 +00:00 committed by Ulrich Weigand
parent 2d34c58790
commit 23a64177fb
2 changed files with 34 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2002-10-15 Ulrich Weigand <uweigand@de.ibm.com>
* gcc.c-torture/execute/20021015-1.c: New test.
Tue Oct 15 14:22:41 2002 J"orn Rennecke <joern.rennecke@superh.com>
* gcc.dg/weak/typeof-2.c: For SH targets, return before baz3 test.

View File

@ -0,0 +1,30 @@
/* PR opt/7409. */
extern void abort (void);
char g_list[] = { '1' };
void g (void *p, char *list, int length, char **elementPtr, char **nextPtr)
{
if (*nextPtr != g_list)
abort ();
**nextPtr = 0;
}
int main (void)
{
char *list = g_list;
char *element;
int i, length = 100;
for (i = 0; *list != 0; i++)
{
char *prevList = list;
g (0, list, length, &element, &list);
length -= (list - prevList);
}
return 0;
}