diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-03 14:20:45 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-03 14:20:45 +0000 |
commit | dd3f21fb2510417dcc967bb1052492caee1fef3d (patch) | |
tree | 9b5af4e1a87ca2598155d388ac3c6a72a49f3888 /libstdc++-v3/include/parallel/quicksort.h | |
parent | 35bd123e690d7ede5c804eed7f42b57decc356cd (diff) | |
download | gcc-dd3f21fb2510417dcc967bb1052492caee1fef3d.tar.gz |
2011-05-03 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48750
* include/parallel/multiway_merge.h: Run _ValueType destructors.
* include/parallel/multiway_mergesort.h: Likewise.
* include/parallel/quicksort.h: Likewise.
* include/parallel/random_shuffle.h: Likewise.
* include/parallel/partial_sum.h: Likewise.
* include/parallel/losertree.h: Run destructors; minor tweaks.
* include/parallel/par_loop.h: Run destructors, fix memory
allocations and deallocations.
* testsuite/26_numerics/accumulate/48750.cc: New.
* testsuite/ext/profile/mutex_extensions_neg.cc: Do not run in
parallel-mode to avoid spurious multiple errors.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173309 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/parallel/quicksort.h')
-rw-r--r-- | libstdc++-v3/include/parallel/quicksort.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libstdc++-v3/include/parallel/quicksort.h b/libstdc++-v3/include/parallel/quicksort.h index 1884eb867fa..1b4d5983d06 100644 --- a/libstdc++-v3/include/parallel/quicksort.h +++ b/libstdc++-v3/include/parallel/quicksort.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -82,6 +82,8 @@ namespace __gnu_parallel _DifferenceType __split = __parallel_partition(__begin, __end, __pred, __num_threads); + for (_DifferenceType __s = 0; __s < __num_samples; ++__s) + __samples[__s].~_ValueType(); ::operator delete(__samples); return __split; |