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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [template/] [friend35.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
 
3
// Origin: Giovanni Bajo 
4
 
5
// PR c++/4403: Incorrect friend class chosen during instantiation.
6
 
7
template 
8
struct A
9
{
10
  struct F;
11
};
12
 
13
template 
14
struct B : A
15
{
16
  friend struct F;
17
private:
18
  int priv;
19
};
20
 
21
struct F
22
{
23
  void func(void)
24
  {
25
    B b;
26
    b.priv = 0;
27
  }
28
};

powered by: WebSVN 2.1.0

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