From: Vladimir Makarov Date: Mon, 29 Oct 2012 14:42:05 +0000 (+0000) Subject: re PR rtl-optimization/55106 (ice: Maximum number of LRA constraint passes is achieve... X-Git-Tag: upstream/12.2.0~73252 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=13a6a8d23faa0bec6e9a98a852eb68a15c60ec18;p=platform%2Fupstream%2Fgcc.git re PR rtl-optimization/55106 (ice: Maximum number of LRA constraint passes is achieved (15)) 2012-10-29 Vladimir Makarov PR rtl-optimization/55106 * g++.dg/pr55106.C: New. From-SVN: r192944 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d07052b..36d2297 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-10-29 Vladimir Makarov + + PR rtl-optimization/55106 + * g++.dg/pr55106.C: New. + 2012-10-29 Richard Guenther PR middle-end/53695 diff --git a/gcc/testsuite/g++.dg/pr55106.C b/gcc/testsuite/g++.dg/pr55106.C new file mode 100644 index 0000000..4727822 --- /dev/null +++ b/gcc/testsuite/g++.dg/pr55106.C @@ -0,0 +1,67 @@ +/* { dg-do compile } */ +/* { dg-options "-c -O3" } */ +template struct A { + typedef _Tp *pointer; + typedef _Tp& reference; + typedef _Tp& const_reference; + templatestruct rebind + { + typedef A other; + }; +}; + +templatestruct __alloc_traits +{ + typedef typename _Alloc::pointer pointer; + typedef typename _Alloc::reference reference; + typedef typename _Alloc::const_reference const_reference; + templatestruct rebind + { + typedef typename _Alloc::template rebind<_Tp>::other other; + }; +}; +templatestruct B +{ + typedef typename __alloc_traits<_Alloc>::template rebind< + _Tp>::other _Tp_alloc_type; + typedef typename __alloc_traits<_Tp_alloc_type>::pointer pointer; + struct F + { + pointer _M_start; + }; + F _M_impl; +}; +template >class vec : B<_Tp, _Alloc>{ + typedef B<_Tp, _Alloc> _Base; + typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; + typedef __alloc_traits<_Tp_alloc_type> _Alloc_traits; + +public: + typedef _Tp value_type; + typedef typename _Alloc_traits::reference reference; + typedef typename _Alloc_traits::const_reference const_reference; + reference operator[](int p1) + { + return *(this->_M_impl._M_start + p1); + } + + const_reference operator[](long) const; +}; + +int a[17]; +class C { + vec m_value; + void opModDivGuts(const C&); + int mostSetBitP1() const; +}; +void C::opModDivGuts(const C& p1) +{ + int b = p1.mostSetBitP1(), c = b + 1; + int d[16]; + + for (int i = c; i; i--) + a[i] = p1.m_value[i] << b; + + for (int i = 0; i < c; i++) + m_value[i] = d[i] >> b << -b; +}