blob: f8b3445e547b310b6e25c494d85ca7fb0708f61d (
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
|
/*
20040423-1.c from the execute part of the gcc torture suite.
*/
#include <testfwk.h>
#ifdef __SDCC
#pragma std_c99
#endif
#if 0 // TODO: enable when variable-length arrays are asupported!
#include <string.h>
int
sub1 (int i, int j)
{
typedef struct
{
int c[i+2];
}c;
int x[10], y[10];
if (j == 2)
{
memcpy (x, y, 10 * sizeof (int));
return sizeof (c);
}
else
return sizeof (c) * 3;
}
#endif
void
testTortureExecute (void)
{
#if 0
typedef struct
{
int c[22];
}c;
if (sub1 (20, 3) != sizeof (c)*3)
ASSERT (0);
return;
#endif
}
|