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

Subversion Repositories openrisc

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

Compare with Previous | Blame | View Log

// { dg-do run  }
// PRMS id: 11315
// Bug: g++ doesn't recognize the copy ctor for Array<long>.

template <class Type>
class Array {
public:
  Array(int sz=12)
    : ia (new Type[sz]), size(sz) {}
  ~Array() { delete[] ia;}
  Array(const Array<long>& r) : size(0) {} // just for testing
private:
  Type *ia;
  int size;
};

int main(int argc, char *argv[])
{
  Array<long> ia;       // looping occurs on this line
}

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.