From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- gcc/testsuite/g++.dg/lto/20101010-1_0.C | 109 ++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 gcc/testsuite/g++.dg/lto/20101010-1_0.C (limited to 'gcc/testsuite/g++.dg/lto/20101010-1_0.C') diff --git a/gcc/testsuite/g++.dg/lto/20101010-1_0.C b/gcc/testsuite/g++.dg/lto/20101010-1_0.C new file mode 100644 index 000000000..6eb40efc8 --- /dev/null +++ b/gcc/testsuite/g++.dg/lto/20101010-1_0.C @@ -0,0 +1,109 @@ +// { dg-lto-do link } + +typedef long size_t; +template < class, class > struct pair +{ +} +; +template < typename > class allocator; +template < typename > struct equal_to; + +template < class > struct hash; +template +< +class, class, class, class, class, class > struct dense_hashtable_iterator; +template +< +class, + class, class, class, class, class > struct dense_hashtable_const_iterator; +template +< +class +Value, + class + Key, + class + HashFcn, + class ExtractKey, class EqualKey, class Alloc > class dense_hashtable +{ +public: + typedef Key key_type; + typedef Value value_type; + typedef size_t size_type; + typedef + dense_hashtable_iterator + < Value, Key, HashFcn, ExtractKey, EqualKey, Alloc > iterator; + typedef + dense_hashtable_const_iterator + < Value, Key, HashFcn, ExtractKey, EqualKey, Alloc > const_iterator; + static const size_type ILLEGAL_BUCKET = (-1); + pair < size_type, size_type > find_position (key_type) + { + size_type insert_pos = ILLEGAL_BUCKET; + } + pair < iterator, bool > insert_noresize (value_type obj) + { + pair < size_type, size_type > pos = find_position ((obj)); + } + pair < iterator, bool > insert (value_type & obj) + { + insert_noresize (obj); + } + ExtractKey get_key; +} + +; +template +< +class +Value, + class + HashFcn + = + hash + < + Value + >, + class + EqualKey + = + equal_to < Value >, class Alloc = allocator < Value > >class dense_hash_set +{ + struct Identity + { + } + ; + typedef + dense_hashtable < Value, Value, HashFcn, Identity, EqualKey, Alloc > ht; + ht rep; +public: + typedef typename ht::value_type value_type; + typedef typename ht::const_iterator iterator; + pair < iterator, bool > insert (value_type obj) + { + pair < typename ht::iterator, bool > p = rep.insert (obj); + } +} + +; +class blah_46 +{ +} +; +struct foo_10:dense_hash_set < blah_46 > +{ +} +; +class foo_14 +{ + void hmmmmh_5 (blah_46); + foo_10 negative_rrrrrrr_type_data_; +} +; +void +foo_14::hmmmmh_5 (blah_46 hahaha_id) +{ + negative_rrrrrrr_type_data_.insert (hahaha_id); +} + +int main () { return 0; } -- cgit v1.2.3