OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [pt1.C] - Rev 699

Compare with Previous | Blame | View Log

// { dg-do run  }
template <class T, class V>
class A {
public:
  A (T at, V av);
  void print () { }
protected:
  T t;
  V v;
};

template <class T, class V>
A<T, V>::A (T at, V av) {
  t = at;
  v = av;
}


template <class T, class V>
class B: public virtual A<T, V> {
public:
  B (T at, V av);
  void print () { }
};

template <class T, class V>
B<T, V>::B (T at, V av) : A<T, V> (at, av) { }  // { dg-bogus "" } 

int main () {
  int i = 2;
  double x = 2;

  B<int, double> ab(i, x);
  ab.print();

  return 0;
}

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.