1 // PR c++/53524
2 // { dg-options "-Wno-enum-compare" }
3 
4 template < typename > struct PointerLikeTypeTraits {
5   enum { NumLowBitsAvailable };
6 };
7 
8 class CodeGenInstruction;
9 class CodeGenInstAlias;
10 
11 template < typename T>
12 struct PointerIntPair {
13   enum { IntShift = T::NumLowBitsAvailable };
14 };
15 
16 template < typename PT1, typename PT2 > struct PointerUnionUIntTraits {
17   enum {
18     PT1BitsAv = PointerLikeTypeTraits < PT1 >::NumLowBitsAvailable,
19     PT2BitsAv = PointerLikeTypeTraits < PT2 >::NumLowBitsAvailable,
20     NumLowBitsAvailable = 0 ? PT1BitsAv : PT2BitsAv
21   };
22 };
23 
24 template < typename PT1, typename PT2 > class PointerUnion {
25   typedef PointerIntPair < PointerUnionUIntTraits < PT1, PT2 > > ValTy;
26   ValTy Val;
27 };
28 
29 struct ClassInfo {
30   PointerUnion < CodeGenInstruction *, CodeGenInstAlias * > DefRec;
31 };
32