summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/inherit/cond1.C
blob: 843c72ca308c85886cde8326c37a9e95e36c66f1 (plain)
1
2
3
4
5
6
7
8
9
10
// Origin: jason@redhat.com
// { dg-do compile }

struct A { A(); A(const A&); int i; };
struct B: public A { };

int f (bool b, A& ar, B& br)
{
  return (b?ar:br).i;
}