re PR lto/63166 (ICE (LTO): ipa_intraprocedural_devirtualization, at ipa-prop.c:2611)
[official-gcc.git] / gcc / testsuite / g++.dg / lto / pr63166_1.ii
blob29438fe5edc0225995c5681ec8d4847062cbf850
1 class EIdent { };
2 class Cstring { };
3 template < class KEY, class VALUE, class HASHER > class HashMapIterator
5 public:
6   virtual ~ HashMapIterator () { }
7 };
9 class ECell;
10 class ECell_ptr
12   ECell *mp_element;
13 public:
14     ECell * operator -> () const
15   {
16     return (mp_element);
17   }
19 sicat_cmd_status;
20 class CellListIterator;
21 class ECellList
23 public:
24   virtual CellListIterator * createIterator () const = 0;
25   virtual ECell_ptr Find (const EIdent & anIdent) = 0;
27 class Foobar_Out
29   virtual int get_channel () { }
30 public:
31     Foobar_Out & operator << (const char *str);
32   Foobar_Out & operator << (const Cstring & cstring);
35 class Foobar_Log:public Foobar_Out { };
36 extern Foobar_Log Foobar_LOG;
37 template < class KEY > class BagIterator
39 public:
40   inline const KEY & operator * () const;
41   inline int atEnd () const;
44 class EMaskView;
45 class ECell
47 public:
48   virtual const EMaskView & getMaskView () const = 0;
50 class FoobarDatabase
52 public:
53   const Cstring & getName (const EIdent & id) const;
54   ECellList *getCellList ();
56 inline FoobarDatabase &
57 DB () { }
59 class EMaskView
61 public:
62   inline BagIterator < EIdent > getCallerIterator () const;
64 struct DBHashFunctions
67 class CellListIterator:public HashMapIterator < EIdent, ECell *,
68   DBHashFunctions >
71 class IdentSet
73 public:
74   unsigned int getSize () const { }
75   int isEmpty () const { }
77 class IdentSetIterator
79 public:
80   IdentSetIterator (const IdentSet * p_source) { }
81   int atEnd () const { }
82   EIdent operator* () const { }
84 void
85 validate ()
87   IdentSet complete_cell_ids;
88   IdentSet incomplete_cell_ids;
89   CellListIterator *p_cl_it = DB ().getCellList ()->createIterator ();
90   delete p_cl_it;
91   while (!incomplete_cell_ids.isEmpty ())
92     {
93       if (incomplete_cell_ids.getSize () < complete_cell_ids.getSize ())
94         {
95           IdentSetIterator complete_cell_it (&complete_cell_ids);
96           while (!complete_cell_it.atEnd ())
97             {
98               BagIterator < EIdent > caller_it =
99                 DB ().getCellList ()->Find (*complete_cell_it)->
100                 getMaskView ().getCallerIterator ();
101               while (!caller_it.atEnd ())
102                 {
103                   Foobar_LOG << DB ().getName (*caller_it) << " ";
104                 }
105             }
106         }
107     }