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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.jason/] [tempinst1.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do link  }
2
// { dg-options "-g" }
3
// Bug: g++ fails to instantiate operator<<.
4
 
5
struct ostream {
6
  ostream& operator<< (const char *) { return *this; };
7
};
8
 
9
template  class foo;
10
 
11
template  ostream& operator<< (ostream& ios, foo&obj) {return ios;}
12
 
13
template  class foo {
14
  friend ostream& operator<<<>(ostream&, foo&);
15
};
16
 
17
int main()
18
{
19
  ostream cout;
20
  foo foo_obj;
21
  cout << foo_obj; // causes linker error
22
  return 0;
23
}

powered by: WebSVN 2.1.0

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