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++.robertl/] [eb12.C] - Diff between revs 149 and 154

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

Rev 149 Rev 154
// { dg-do assemble  }
// { dg-do assemble  }
// Error: Internal Compiler Error in 2.7.2. & egcs 1.0.0
// Error: Internal Compiler Error in 2.7.2. & egcs 1.0.0
#ifndef NO_META_MAX
#ifndef NO_META_MAX
template
template
struct meta_max {
struct meta_max {
    enum { max = (N1 > N2) ? N1 : N2 };
    enum { max = (N1 > N2) ? N1 : N2 };
};
};
#endif
#endif
struct X {
struct X {
    enum {
    enum {
       a = 0,
       a = 0,
       n = 0
       n = 0
    };
    };
};
};
template
template
struct Y {
struct Y {
    enum {
    enum {
       a = T1::a + T2::a,
       a = T1::a + T2::a,
       // NB: if the next line is changed to
       // NB: if the next line is changed to
       // n = (T1::n > T2::n) ? T1::n : T2::n
       // n = (T1::n > T2::n) ? T1::n : T2::n
       // the problem goes away.
       // the problem goes away.
       n = meta_max::max
       n = meta_max::max
    };
    };
};
};
int z = Y::a;
int z = Y::a;
 
 

powered by: WebSVN 2.1.0

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