blob: fa7dda88a3ebb5c0cf5d7c717b94c911eb04fb0e [file] [log] [blame]
// PR c++/53524
// { dg-options "-Wno-enum-compare" }
template < typename > struct PointerLikeTypeTraits {
enum { NumLowBitsAvailable };
};
class CodeGenInstruction;
class CodeGenInstAlias;
template < typename T>
struct PointerIntPair {
enum { IntShift = T::NumLowBitsAvailable };
};
template < typename PT1, typename PT2 > struct PointerUnionUIntTraits {
enum {
PT1BitsAv = PointerLikeTypeTraits < PT1 >::NumLowBitsAvailable,
PT2BitsAv = PointerLikeTypeTraits < PT2 >::NumLowBitsAvailable,
NumLowBitsAvailable = 0 ? PT1BitsAv : PT2BitsAv
};
};
template < typename PT1, typename PT2 > class PointerUnion {
typedef PointerIntPair < PointerUnionUIntTraits < PT1, PT2 > > ValTy;
ValTy Val;
};
struct ClassInfo {
PointerUnion < CodeGenInstruction *, CodeGenInstAlias * > DefRec;
};