blob: 0dc4823bdbf149aab17864b12d0ae7fa9819f556 (
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
41
42
43
44
45
46
47
48
49
50
51
52
53
|
/*
20001024-1.c from the execute part of the gcc torture tests.
*/
#include <testfwk.h>
#ifdef __SDCC
#pragma std_c99
#pragma disable_warning 85
#endif
#include <string.h>
#ifndef __SDCC_pdk14 // Lack of memory - see RFE #609
struct a;
extern int baz (struct a *restrict x);
struct a {
long v;
long w;
};
struct b {
struct a c;
struct a d;
};
int bar (int x, const struct b *restrict y, struct b *restrict z)
{
if (y->c.v || y->c.w != 250000 || y->d.v || y->d.w != 250000)
ASSERT (0);
}
void foo(void)
{
struct b x;
x.c.v = 0;
x.c.w = 250000;
x.d = x.c;
bar(0, &x, ((void *)0));
}
#endif
void
testTortureExecute (void)
{
#ifndef __SDCC_pdk14 // Lack of memory - see RFE #609
foo();
return;
#endif
}
|