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
Fix warnings occured during profiledboostrap on
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.jason
/
scoping4.C
blob
c32b4a66022fa519f844bf2c492ea2918a0045ea
1
// { dg-do assemble }
2
// PRMS Id: 4375
3
// Bug: g++ fails to keep track of nested typedefs properly.
4
5
class A {
6
public:
7
typedef const char * Ptr;
8
Ptr s;
9
Ptr get_string();
10
A(Ptr string); // { s = string; };
11
};
12
13
class B {
14
public:
15
typedef A * Ptr;
16
Ptr a;
17
Ptr get_A();
18
B(Ptr a_ptr);
19
};
20
21
A::A(Ptr string) { // { dg-bogus "" }
22
s = string; // { dg-bogus "" }
23
}
24
25
int main() {
26
A a("testing");
27
A *a_ptr;
28
B b(&a);
29
a_ptr = b.get_A();
30
}