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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [opt/] [pr18683-1.C] - Rev 693

Compare with Previous | Blame | View Log

// PR middle-end/18683
// { dg-do compile }
// { dg-options "-O0" }

template<typename _CharT>
struct basic_ostream
{
  basic_ostream& operator<<(int __n);
};

extern basic_ostream<char>  cout;

template<int> struct linear_congruential
{
  template<class CharT>
  friend basic_ostream<CharT>&
  operator<<(basic_ostream<CharT>& os,
             const linear_congruential& lcg)
  {
    return os << 1;
  }
};

void instantiate_all()
{
  linear_congruential<0> lcf;
  cout << lcf;
}

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.