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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.jason/] [tempinst1.C] - Diff between revs 149 and 154

Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
// { dg-do link  }
// { dg-do link  }
// { dg-options "-g" }
// { dg-options "-g" }
// Bug: g++ fails to instantiate operator<<.
// Bug: g++ fails to instantiate operator<<.
struct ostream {
struct ostream {
  ostream& operator<< (const char *) { return *this; };
  ostream& operator<< (const char *) { return *this; };
};
};
template  class foo;
template  class foo;
template  ostream& operator<< (ostream& ios, foo&obj) {return ios;}
template  ostream& operator<< (ostream& ios, foo&obj) {return ios;}
template  class foo {
template  class foo {
  friend ostream& operator<<<>(ostream&, foo&);
  friend ostream& operator<<<>(ostream&, foo&);
};
};
int main()
int main()
{
{
  ostream cout;
  ostream cout;
  foo foo_obj;
  foo foo_obj;
  cout << foo_obj; // causes linker error
  cout << foo_obj; // causes linker error
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

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