repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
vla-dealloc-1.c
blob
3b74b85a10e88aae86eb3a19a91f9a8f30611af8
1
/* VLAs should be deallocated on a jump to before their definition,
2
including a jump to a label in an inner scope. PR 19771. */
3
/* { dg-require-effective-target alloca } */
4
5
#if (__SIZEOF_INT__ <= 2)
6
#define LIMIT 10000
7
#else
8
#define LIMIT 1000000
9
#endif
10
11
void
*
volatile
p
;
12
13
int
14
main
(
void
)
15
{
16
int
n
=
0
;
17
if
(
0
)
18
{
19
lab
:;
20
}
21
int
x
[
n
%
1000
+
1
];
22
x
[
0
] =
1
;
23
x
[
n
%
1000
] =
2
;
24
p
=
x
;
25
n
++;
26
if
(
n
<
LIMIT
)
27
goto
lab
;
28
return
0
;
29
}