2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / lto / 20101010-1_0.C
blobbb3e6d4841560ea6f622ae935e577d046c091525
1 // { dg-lto-do link }
3 /* "WARNING: lto.exp does not support dg-additional-options" */
4 #pragma GCC diagnostic ignored "-Wreturn-type"
6 typedef long size_t;
7 template < class, class > struct pair
11 template < typename > class allocator;
12 template < typename > struct equal_to;
14 template < class > struct hash;
15 template
17 class, class, class, class, class, class > struct dense_hashtable_iterator;
18 template
20 class,
21     class, class, class, class, class > struct dense_hashtable_const_iterator;
22 template
24 class
25 Value,
26     class
27     Key,
28     class
29     HashFcn,
30     class ExtractKey, class EqualKey, class Alloc > class dense_hashtable
32 public:
33     typedef Key key_type;
34     typedef Value value_type;
35     typedef size_t size_type;
36     typedef
37         dense_hashtable_iterator
38         < Value, Key, HashFcn, ExtractKey, EqualKey, Alloc > iterator;
39     typedef
40         dense_hashtable_const_iterator
41         < Value, Key, HashFcn, ExtractKey, EqualKey, Alloc > const_iterator;
42     static const size_type ILLEGAL_BUCKET = (-1);
43     pair < size_type, size_type > find_position (key_type)
44       {
45         size_type insert_pos = ILLEGAL_BUCKET;
46       }
47     pair < iterator, bool > insert_noresize (value_type obj)
48       {
49         pair < size_type, size_type > pos = find_position ((obj));
50       }
51     pair < iterator, bool > insert (value_type & obj)
52       {
53         insert_noresize (obj);
54       }
55     ExtractKey get_key;
59 template
61 class
62 Value,
63     class
64     HashFcn
65     =
66     hash
67     <
68     Value
69     >,
70     class
71     EqualKey
72     =
73     equal_to < Value >, class Alloc = allocator < Value > >class dense_hash_set
75   struct Identity
76     {
77     }
78   ;
79   typedef
80       dense_hashtable < Value, Value, HashFcn, Identity, EqualKey, Alloc > ht;
81   ht rep;
82 public:
83   typedef typename ht::value_type value_type;
84   typedef typename ht::const_iterator iterator;
85   pair < iterator, bool > insert (value_type obj)
86     {
87       pair < typename ht::iterator, bool > p = rep.insert (obj);
88     }
92 class blah_46
96 struct foo_10:dense_hash_set < blah_46 >
100 class foo_14
102   void hmmmmh_5 (blah_46);
103   foo_10 negative_rrrrrrr_type_data_;
106 void
107 foo_14::hmmmmh_5 (blah_46 hahaha_id)
109   negative_rrrrrrr_type_data_.insert (hahaha_id);
112 int main () { return 0; }