You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by fa...@apache.org on 2008/11/12 03:55:41 UTC

svn commit: r713249 - /stdcxx/branches/4.2.x/include/rw/_heap.cc

Author: faridz
Date: Tue Nov 11 18:55:40 2008
New Revision: 713249

URL: http://svn.apache.org/viewvc?rev=713249&view=rev
Log:
2008-11-12  Farid Zaripov  <fa...@apache.org>

	STDCXX-1022
	* include/rw/_heap.cc (__make_heap): Worked around an ICE on
	32-bit MSVC in optimized builds.

Modified:
    stdcxx/branches/4.2.x/include/rw/_heap.cc

Modified: stdcxx/branches/4.2.x/include/rw/_heap.cc
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/rw/_heap.cc?rev=713249&r1=713248&r2=713249&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/rw/_heap.cc (original)
+++ stdcxx/branches/4.2.x/include/rw/_heap.cc Tue Nov 11 18:55:40 2008
@@ -95,7 +95,13 @@
 
     const _Dist __dist = __last - __first;
 
+#if   !defined (_RWSTD_MSVC) || (1500 < _RWSTD_MSVC) \
+    || defined (_WIN64) || defined (_RWSTDDEBUG)
     for (_Dist __parent = (__dist - 2) / 2; ; --__parent) {
+#else   // _RWSTD_MSVC <= 1500 && !_WIN64 && !_RWSTDDEBUG
+    // Workaround for ICE on 32-bit MSVC in optimized builds (STDCXX-1022)
+    for (_Dist __parent = (__dist - 2) / 2; 0 <= __parent; --__parent) {
+#endif   // !_RWSTD_MSVC || _RWSTD_MSVC > 1500 || _WIN64 || _RWSTDDEBUG
         __adjust_heap (__first, __parent, __dist, *(__first + __parent),
                        __comp);
         if (__parent == 0)