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
reflect: canonicalize types returned by StructOf() and friends
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.brendan
/
scope2.C
blob
1d211aac40306609711ab633035c995a318897d5
1
// { dg-do assemble }
2
// GROUPS passed scoping
3
class A
4
{
5
public:
6
A() {}
7
~A() {}
8
virtual void f() {}
9
};
10
11
class B : public A
12
{
13
public:
14
B() {}
15
~B() {}
16
virtual void f() {}
17
};
18
19
20
B GLOBAL_B;
21
22
B& foo() {return GLOBAL_B;}
23
24
int main()
25
{
26
// build_scoped_method_call and build_scoped_ref should know how
27
// to deal with a reference for this
28
foo().A::f();
29
}