Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.jason/template3.C

raw
1 // { dg-do run }
2 // PRMS Id: 4679
3 // Bug: g++ doesn't re-instantiate templates after definition is seen.
4
5 template <class T> struct A;
6
7 A<int> *a;
8
9 template <class T> struct A { T t; };
10
11 int main()
12 {
13 if (a)
14 a->t = 1; // { dg-bogus "" }
15 }