stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farid Zaripov" <Farid_Zari...@epam.com>
Subject 21.string.cons.cpp test fails on 64-bit MSVC (8.0 and 9.0)
Date Tue, 13 Nov 2007 16:02:08 GMT
  The 21.string.cons.cpp test fails with 16 assertions on 64-bit MSVC
(8.0 and 9.0).

 
http://people.apache.org/~sebor/stdcxx/results/win_xp_1-em64t-msvc-8.0.h
tml
 
http://people.apache.org/~sebor/stdcxx/results/win_2003_1-em64t-msvc-8.0
.html
 
http://people.apache.org/~sebor/stdcxx/results/win_vista_0-em64t-msvc-8.
0.html

  The reason is the bad code generation of the compiler. JIRA is not
available
at the moment, so I'll create the issue later. Unfortunately I cannot
make
the simple testcase to reproduce the problem. The problem detected only
in
optimized builds (8{s|d}, 12{s|d}). As the temporary workaround might be
definition of the __rw::__rw_new_capacity as __declspec (noinline).

  Also maybe this problem would be accidentally fixed thus resolving the
issue named something like "floating point operation in
__rw_new_capacity"
(I've seen this issue before).

------------------------------
Index: include/string
===================================================================
--- include/string	(revision 593511)
+++ include/string	(working copy)
@@ -1528,8 +1528,13 @@
 // more specialized version for basic_string<>; may be further
specialized
 // in user code for example on a user-defined allocator
 
+#if !defined (_WIN64) || !defined (_MSC_VER) || defined
(__INTEL_COMPILER)
 template <class _CharT, class _Traits, class _Allocator>
 inline _RWSTD_STRING_SIZE_TYPE
+#else    // _WIN64 && _MSC_VER && !__INTEL_COMPILER
+template <class _CharT, class _Traits, class _Allocator>
+__declspec (noinline) _RWSTD_STRING_SIZE_TYPE
+#endif   // !_WIN64 || !_MSC_VER || __INTEL_COMPILER
 __rw_new_capacity (_RWSTD_STRING_SIZE_TYPE __size,
                    const _STD::basic_string<_CharT, _Traits,
_Allocator>*)
 {
------------------------------
  
Farid.

Mime
View raw message