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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [template/] [friend35.C] - Diff between revs 154 and 816

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

Rev 154 Rev 816
// { dg-do compile }
// { dg-do compile }
// Origin: Giovanni Bajo 
// Origin: Giovanni Bajo 
// PR c++/4403: Incorrect friend class chosen during instantiation.
// PR c++/4403: Incorrect friend class chosen during instantiation.
template 
template 
struct A
struct A
{
{
  struct F;
  struct F;
};
};
template 
template 
struct B : A
struct B : A
{
{
  friend struct F;
  friend struct F;
private:
private:
  int priv;
  int priv;
};
};
struct F
struct F
{
{
  void func(void)
  void func(void)
  {
  {
    B b;
    B b;
    b.priv = 0;
    b.priv = 0;
  }
  }
};
};
 
 

powered by: WebSVN 2.1.0

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