summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/mangle10.C
blob: b24fe716ed5037c2ad76e83c9878cf1c4a5af542 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// { dg-do assemble  }

template<int T>
struct A {
  char *a;
  A (const char* x)
  {
    a = (char*) x;
  }
};

template<int U, int V, class T>
struct B {
  T a[V-U+1];
  friend A<V-U+1> f (B const &x)
  {
    return A<V-U+1> ((char*) x.a);
  }
};

const int a = 8;

typedef B<1,a,int> C;
struct D {
  C x;
};