blob: 5d281dbaf5127118338ee598787c845f954ba1cf (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
/*
20021015-1.c from the execute part of the gcc torture suite.
*/
#include <testfwk.h>
#ifdef __SDCC
#pragma std_c99
#endif
#pragma disable_warning 85
/* PR opt/7409. */
char g_list[] = { '1' };
void g (void *p, char *list, int length, char **elementPtr, char **nextPtr)
{
if (*nextPtr != g_list)
ASSERT (0);
**nextPtr = 0;
}
void testTortureExecute (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;
}
|