1 // { dg-do compile } 2 // { dg-options "-fgnu-tm -O3 -Wno-return-type" } 3 advance(_InputIterator & __i,_Distance __n)4template<typename _InputIterator, typename _Distance> inline void advance(_InputIterator& __i, _Distance __n) 5 { 6 if (__n > 0) 7 while (__n--) 8 --__i; 9 else 10 --__i; 11 } 12 13 void _Rb_tree_increment (); 14 15 template<typename _Tp> struct _Rb_tree_iterator 16 { 17 typedef _Rb_tree_iterator<_Tp> iterator; 18 19 iterator& operator--() 20 { 21 _Rb_tree_increment(); 22 } 23 }; 24 update()25void update () 26 { 27 _Rb_tree_iterator<int>::iterator it; 28 __transaction_relaxed 29 { 30 advance (it, 0); 31 } 32 } 33 34