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
2014-04-07 Charles Baylis <charles.baylis@linaro.org>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
torture
/
20120420-1.C
blob
ada0ab67e939a51ca819376b0951187f889103ed
1
// { dg-do compile }
2
3
int g, *gp[100];
4
struct V {
5
int* x;
6
int y;
7
};
8
9
void foo (V **p, V* end, int i)
10
{
11
*p = 0;
12
V* pp = *p;
13
int s = 100;
14
for (; pp < end; )
15
{
16
pp++;
17
(pp-1)->x = &g;
18
if (g)
19
{
20
if (g>10)
21
g++;
22
int *t = (int*) operator new (100);
23
(pp-1)->x = t;
24
}
25
else
26
s--;
27
gp[end-pp] = (pp-1)->x + s;
28
}
29
}