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