[Bug libstdc++/42182] memory errors using valarrays
christian dot bruel at st dot com
gcc-bugzilla@gcc.gnu.org
Thu Nov 26 11:40:00 GMT 2009
------- Comment #5 from christian dot bruel at st dot com 2009-11-26 11:40 -------
Created an attachment (id=19156)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19156&action=view)
Proposed patch
2009-11-23 Christian Bruel <christian.bruel@st.com>
* include/bits/mask_array.h (mask_array<_Tp>::operator=): Use _M_sz.
(mask_array<_Tp>::operator _Op##): Likewise.
* testsuite/26_numerics/valarray/mask_array.cc: New test.
This patch makes the valarray_copy interates on the number of true elements
rather than on the array size.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42182
More information about the Gcc-bugs
mailing list