aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/expr/static_cast7.C
blob: bced805bcdbe4631c2e16dd551e4495bd4443c7b (plain)
1
2
3
4
5
6
7
8
9
10
// Regression test for bug 39415 (and its duplicate 44916).
struct S {};
struct T : S {};
int f(const T*) {}
void f(T*);
int main() {
  S* s(0);
  int a = f(static_cast<const T*>(s));
  int b = f(static_cast<const T*>(0));
}