repo.or.cz
/
official-gcc
/
graphite-test-results.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Remove outermost loop parameter.
[official-gcc/graphite-test-results.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.ns
/
alias6.C
blob
31b10bf38f904ff613b93426fa935c44fe115bb5
1
// { dg-do run }
2
// Check namespace aliases inside blocks
3
namespace A {
4
int i;
5
void f(){
6
i = 0;
7
}
8
}
9
10
int g();
11
12
int main ()
13
{
14
namespace B = A;
15
B::i=42;
16
B::f();
17
using namespace B;
18
f();
19
// A::i is now 0, B::i is 1
20
return g();
21
}
22
23
namespace B {
24
int i = 1;
25
}
26
27
int g()
28
{
29
namespace x = A;
30
if (x::i)
31
{
32
namespace x = B;
33
return x::i;
34
}
35
return x::i;
36
}