OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
PR middle-end/35456
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
960521-1.c
1
#include <stdlib.h>
2
3
int *a, *b;
4
int n;
5
6
#ifdef STACK_SIZE
7
#define BLOCK_SIZE (STACK_SIZE / (sizeof (*a) + sizeof (*b)))
8
#else
9
#define BLOCK_SIZE 32768
10
#endif
11
foo ()
12
{
13
int i;
14
for (i = 0; i < n; i++)
15
a[i] = -1;
16
for (i = 0; i < BLOCK_SIZE - 1; i++)
17
b[i] = -1;
18
}
19
20
main ()
21
{
22
n = BLOCK_SIZE;
23
a = malloc (n * sizeof(*a));
24
b = malloc (n * sizeof(*b));
25
*b++ = 0;
26
foo ();
27
if (b[-1])
28
abort ();
29
exit (0);
30
}