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
Dead
[official-gcc.git]
/
gomp-20050608-branch
/
gcc
/
testsuite
/
g++.dg
/
compat
/
init
/
init-ref2_y.C
blob
23e66b2f9a140dfebd7b9d334a77bd190ac1fdf9
1
extern int f (void);
2
extern int r;
3
4
const int *p;
5
6
void g ()
7
{
8
static const int &i = f();
9
10
// Test that i points to the same place in both calls.
11
if (p && p != &i)
12
++r;
13
// Test that if so, it points to static data.
14
if (i != 42)
15
++r;
16
17
p = &i;
18
}
19
20
void h ()
21
{
22
int arr[] = { 1, 1, 1, 1, 1, 1, 1 };
23
g ();
24
}