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++.ns/] [koenig3.C] - Diff between revs 305 and 338

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

Rev 305 Rev 338
// { dg-do run  }
// { dg-do run  }
//Check association of member pointer in overload resolution.
//Check association of member pointer in overload resolution.
struct A {
struct A {
        int m_val;
        int m_val;
        friend int operator ->* (A & other, int A::*pm)
        friend int operator ->* (A & other, int A::*pm)
                { return 31; }
                { return 31; }
};
};
int A::*pi = & A::m_val;
int A::*pi = & A::m_val;
int
int
main(void)
main(void)
{
{
        A c;
        A c;
        c.m_val = 42;
        c.m_val = 42;
        int j = c ->* pi;
        int j = c ->* pi;
        if (j == 31)
        if (j == 31)
                return 0;
                return 0;
        else
        else
                return 1;
                return 1;
}
}
 
 

powered by: WebSVN 2.1.0

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