summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/warn/Wunused-var-14.C
blob: a552b56dad161e045916bc26c35ac6d85c62b9c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// PR c++/44682
// { dg-do compile }
// { dg-options "-Wunused" }

struct S { virtual ~S () {} };
struct T { virtual ~T () {} };
struct U : S, T {};

void f (U &);

void
g (void *v)
{
  T *t = static_cast <T *> (v);
  U *u = static_cast <U *> (t);
  f (*u);
}