aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/debug/dwarf2/dwarf4-typedef.C
blob: c5520fa72b0975a504e7f1a14d5880e7151e49a6 (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
27
28
29
30
31
32
33
34
/* { dg-do compile } */
/* { dg-options "-gdwarf-4" } */

/* Regression test for an ICE in output_die when using -gdwarf-4.  */

namespace {

struct A {
  virtual ~A();
};

struct B : public A {
  template <typename A>
  bool foo(A x[2]) { }
};

template <typename T>
struct C {
  T v[2];
};

template <typename T>
bool X(T &b) {
  typedef C<int> D;
  D x[2];
  return b.foo(x);
}

void f() {
  B b;
  X<B>(b);
}

}