public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/67707] New: Regression in std::move of std::deque with non-is_always_equal allocator
@ 2015-09-24 9:01 rbd at debian dot org
2015-09-24 9:40 ` [Bug libstdc++/67707] " trippels at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: rbd at debian dot org @ 2015-09-24 9:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67707
Bug ID: 67707
Summary: Regression in std::move of std::deque with
non-is_always_equal allocator
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: rbd at debian dot org
Target Milestone: ---
With gcc 5.2 I see a deque with non-is_always_equal allocator get corrupted
state when moved from. My understanding is that a moved-from container is in a
valid but indeterminate state, and it is OK to assign to it. The code below
reproduces this for me:
$ cat a.cpp
#include <stdio.h>
#include <utility>
#include <deque>
#include <memory>
template<typename T>
struct my_allocator: public std::allocator<T>
{
typedef size_t size_type;
typedef T * pointer;
typedef const T * const_pointer;
typedef std::false_type is_always_equal;
template<typename _Tp1>
struct rebind
{
typedef my_allocator<_Tp1> other;
};
pointer allocate(size_type n, const void *hint = nullptr)
{
return std::allocator<T>::allocate(n, hint);
}
void deallocate(pointer p, size_type n)
{
return std::allocator<T>::deallocate(p, n);
}
size_type max_size() const
{
return std::allocator<T>::max_size();
}
my_allocator() : std::allocator<T>() { }
~my_allocator() { }
my_allocator(const my_allocator & a) : std::allocator<T>(a) { }
template<typename U>
my_allocator(const my_allocator<U> & a) : std::allocator<T>(a) { }
};
int main(int argc, char * argv[])
{
std::deque<int, my_allocator<int>> a;
printf("empty %d size %zd\n", a.empty(), a.size());
a.emplace_back(1);
printf("empty %d size %zd\n", a.empty(), a.size());
std::deque<int, my_allocator<int>> b = std::move(a);
printf("empty %d size %zd\n", a.empty(), a.size());
a = std::deque<int, my_allocator<int>>();
printf("empty %d size %zd\n", a.empty(), a.size());
return 0;
}
$ g++-5 -v --std=c++11 a.cpp
Using built-in specs.
COLLECT_GCC=g++-5
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.2.1-17ubuntu4'
--with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs
--enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-5 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686
--with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib
--with-tune=generic --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.2.1 20150911 (Ubuntu 5.2.1-17ubuntu4)
COLLECT_GCC_OPTIONS='-v' '-std=c++11' '-shared-libgcc' '-mtune=generic'
'-march=x86-64'
/usr/lib/gcc/x86_64-linux-gnu/5/cc1plus -quiet -v -imultiarch x86_64-linux-gnu
-D_GNU_SOURCE a.cpp -quiet -dumpbase a.cpp -mtune=generic -march=x86-64
-auxbase a -std=c++11 -version -fstack-protector-strong -Wformat
-Wformat-security -o /tmp/ccqiuI35.s
GNU C++11 (Ubuntu 5.2.1-17ubuntu4) version 5.2.1 20150911 (x86_64-linux-gnu)
compiled by GNU C version 5.2.1 20150911, GMP version 6.0.0, MPFR
version 3.1.3, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/5"
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-linux-gnu/5/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/include/c++/5
/usr/include/x86_64-linux-gnu/c++/5
/usr/include/c++/5/backward
/usr/lib/gcc/x86_64-linux-gnu/5/include
/usr/local/include
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed
/usr/include/x86_64-linux-gnu
/usr/include
End of search list.
GNU C++11 (Ubuntu 5.2.1-17ubuntu4) version 5.2.1 20150911 (x86_64-linux-gnu)
compiled by GNU C version 5.2.1 20150911, GMP version 6.0.0, MPFR
version 3.1.3, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 5f8f5aa667996d1fc1f2a670de0c5b24
COLLECT_GCC_OPTIONS='-v' '-std=c++11' '-shared-libgcc' '-mtune=generic'
'-march=x86-64'
as -v --64 -o /tmp/cc2UlERW.o /tmp/ccqiuI35.s
GNU assembler version 2.25.1 (x86_64-linux-gnu) using BFD version (GNU Binutils
for Ubuntu) 2.25.1
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-std=c++11' '-shared-libgcc' '-mtune=generic'
'-march=x86-64'
/usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin
/usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so
-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
-plugin-opt=-fresolution=/tmp/cc0395GN.res -plugin-opt=-pass-through=-lgcc_s
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/
--build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed
-dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o
/usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/5
-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu
-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu
-L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib
-L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. /tmp/cc2UlERW.o -lstdc++
--push-state --as-needed -latomic --pop-state -lm -lgcc_s -lgcc -lc -lgcc_s
-lgcc /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o
$ ./a.out
empty 1 size 0
empty 0 size 1
empty 1 size -128
Segmentation fault (core dumped)
By comparison, gcc 4.9 does what I expect:
$ g++-4.9 -v --std=c++11 a.cpp
Using built-in specs.
COLLECT_GCC=g++-4.9
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.9/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.9.3-4ubuntu1'
--with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.9 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-vtable-verify
--enable-plugin --with-system-zlib --disable-browser-plugin
--enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686
--with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib
--with-tune=generic --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.9.3 (Ubuntu 4.9.3-4ubuntu1)
COLLECT_GCC_OPTIONS='-v' '-std=c++11' '-shared-libgcc' '-mtune=generic'
'-march=x86-64'
/usr/lib/gcc/x86_64-linux-gnu/4.9/cc1plus -quiet -v -imultiarch
x86_64-linux-gnu -D_GNU_SOURCE a.cpp -quiet -dumpbase a.cpp -mtune=generic
-march=x86-64 -auxbase a -std=c++11 -version -fstack-protector-strong -Wformat
-Wformat-security -o /tmp/ccHIR4DO.s
GNU C++ (Ubuntu 4.9.3-4ubuntu1) version 4.9.3 (x86_64-linux-gnu)
compiled by GNU C version 4.9.3, GMP version 6.0.0, MPFR version 3.1.3,
MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/4.9"
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/include/c++/4.9
/usr/include/x86_64-linux-gnu/c++/4.9
/usr/include/c++/4.9/backward
/usr/lib/gcc/x86_64-linux-gnu/4.9/include
/usr/local/include
/usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed
/usr/include/x86_64-linux-gnu
/usr/include
End of search list.
GNU C++ (Ubuntu 4.9.3-4ubuntu1) version 4.9.3 (x86_64-linux-gnu)
compiled by GNU C version 4.9.3, GMP version 6.0.0, MPFR version 3.1.3,
MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: a3254b33421ed13322187046e7455455
COLLECT_GCC_OPTIONS='-v' '-std=c++11' '-shared-libgcc' '-mtune=generic'
'-march=x86-64'
as -v --64 -o /tmp/cce6HLF0.o /tmp/ccHIR4DO.s
GNU assembler version 2.25.1 (x86_64-linux-gnu) using BFD version (GNU Binutils
for Ubuntu) 2.25.1
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.9/:/usr/lib/gcc/x86_64-linux-gnu/4.9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.9/:/usr/lib/gcc/x86_64-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.9/:/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-std=c++11' '-shared-libgcc' '-mtune=generic'
'-march=x86-64'
/usr/lib/gcc/x86_64-linux-gnu/4.9/collect2 -plugin
/usr/lib/gcc/x86_64-linux-gnu/4.9/liblto_plugin.so
-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/4.9/lto-wrapper
-plugin-opt=-fresolution=/tmp/cc4WaRIc.res -plugin-opt=-pass-through=-lgcc_s
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/
--build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed
-dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crt1.o
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crti.o
/usr/lib/gcc/x86_64-linux-gnu/4.9/crtbegin.o
-L/usr/lib/gcc/x86_64-linux-gnu/4.9
-L/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu
-L/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../lib -L/lib/x86_64-linux-gnu
-L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib
-L/usr/lib/gcc/x86_64-linux-gnu/4.9/../../.. /tmp/cce6HLF0.o -lstdc++ -lm
-lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/4.9/crtend.o
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crtn.o
$ ./a.out
empty 1 size 0
empty 0 size 1
empty 1 size 0
empty 1 size 0
Also, removing the custom allocator works OK with gcc 5.2. It seems the move
assignment code in the specialization _M_move_assign1(deque&& __x, /* always
equal: */ false_type) is incorrect somewhere.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/67707] Regression in std::move of std::deque with non-is_always_equal allocator
2015-09-24 9:01 [Bug c++/67707] New: Regression in std::move of std::deque with non-is_always_equal allocator rbd at debian dot org
@ 2015-09-24 9:40 ` trippels at gcc dot gnu.org
2015-09-24 12:09 ` [Bug libstdc++/67707] [5/6 regression] " redi at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-09-24 9:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67707
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-09-24
CC| |trippels at gcc dot gnu.org
Component|c++ |libstdc++
Ever confirmed|0 |1
--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
It is a libstc++11 issue. Confirmed.
markus@x4 tmp % clang++ -stdlib=libc++ -std=c++11 a.cpp
markus@x4 tmp % ./a.out
empty 1 size 0
empty 0 size 1
empty 1 size 0
empty 1 size 0
markus@x4 tmp % g++ -fsanitize=undefined --std=c++11 a.cpp
markus@x4 tmp % ./a.out
empty 1 size 0
empty 0 size 1
empty 1 size -128
/usr/lib/gcc/x86_64-pc-linux-gnu/5.2.1/include/g++-v5/bits/stl_deque.h:2162:20:
runtime error: load of null pointer of type 'int *'
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/67707] [5/6 regression] Regression in std::move of std::deque with non-is_always_equal allocator
2015-09-24 9:01 [Bug c++/67707] New: Regression in std::move of std::deque with non-is_always_equal allocator rbd at debian dot org
2015-09-24 9:40 ` [Bug libstdc++/67707] " trippels at gcc dot gnu.org
@ 2015-09-24 12:09 ` redi at gcc dot gnu.org
2015-09-24 14:42 ` redi at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2015-09-24 12:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67707
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/67707] [5/6 regression] Regression in std::move of std::deque with non-is_always_equal allocator
2015-09-24 9:01 [Bug c++/67707] New: Regression in std::move of std::deque with non-is_always_equal allocator rbd at debian dot org
2015-09-24 9:40 ` [Bug libstdc++/67707] " trippels at gcc dot gnu.org
2015-09-24 12:09 ` [Bug libstdc++/67707] [5/6 regression] " redi at gcc dot gnu.org
@ 2015-09-24 14:42 ` redi at gcc dot gnu.org
2015-09-24 15:47 ` redi at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2015-09-24 14:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67707
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Ugh, I hate allocators.
I probably should have added a completely new std::__cxx11::deque for gcc-5
with nothrow move and full allocator support, instead of trying to bolt it on
to our existing std::deque.
Testing this fix:
--- a/libstdc++-v3/include/bits/stl_deque.h
+++ b/libstdc++-v3/include/bits/stl_deque.h
@@ -644,6 +644,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
_Tp_alloc_type __sink __attribute((__unused__)) {std::move(__alloc)};
// Create an empty map that allocates using the moved-from allocator.
_Deque_base __empty{__alloc};
+ __empty._M_initialize_map(0);
// Now safe to modify current allocator and perform non-throwing swaps.
_Deque_impl __ret{std::move(_M_get_Tp_allocator())};
_M_impl._M_swap_data(__ret);
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/67707] [5/6 regression] Regression in std::move of std::deque with non-is_always_equal allocator
2015-09-24 9:01 [Bug c++/67707] New: Regression in std::move of std::deque with non-is_always_equal allocator rbd at debian dot org
` (2 preceding siblings ...)
2015-09-24 14:42 ` redi at gcc dot gnu.org
@ 2015-09-24 15:47 ` redi at gcc dot gnu.org
2015-10-02 20:08 ` redi at gcc dot gnu.org
2015-10-02 20:13 ` redi at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2015-09-24 15:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67707
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Thu Sep 24 15:46:24 2015
New Revision: 228090
URL: https://gcc.gnu.org/viewcvs?rev=228090&root=gcc&view=rev
Log:
Leave moved-from std::deque in a valid state
PR libstdc++/67707
* include/bits/stl_deque.h (_Deque_base::_M_move_impl): Initialize
empty object.
* testsuite/23_containers/deque/allocator/move.cc: Check moved-from
deque.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/stl_deque.h
trunk/libstdc++-v3/testsuite/23_containers/deque/allocator/move.cc
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/67707] [5/6 regression] Regression in std::move of std::deque with non-is_always_equal allocator
2015-09-24 9:01 [Bug c++/67707] New: Regression in std::move of std::deque with non-is_always_equal allocator rbd at debian dot org
` (3 preceding siblings ...)
2015-09-24 15:47 ` redi at gcc dot gnu.org
@ 2015-10-02 20:08 ` redi at gcc dot gnu.org
2015-10-02 20:13 ` redi at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2015-10-02 20:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67707
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Fri Oct 2 20:08:11 2015
New Revision: 228420
URL: https://gcc.gnu.org/viewcvs?rev=228420&root=gcc&view=rev
Log:
Backport PR libstdc++/67707 fix from mainline
PR libstdc++/67707
* include/bits/stl_deque.h (_Deque_base::_M_move_impl): Initialize
empty object.
* testsuite/23_containers/deque/allocator/move.cc: Check moved-from
deque.
* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc:
Adjust dg-error line number.
* testsuite/23_containers/deque/requirements/dr438/
constructor_1_neg.cc: Likewise.
* testsuite/23_containers/deque/requirements/dr438/
constructor_2_neg.cc: Likewise.
* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
Likewise.
Modified:
branches/gcc-5-branch/libstdc++-v3/ChangeLog
branches/gcc-5-branch/libstdc++-v3/include/bits/stl_deque.h
branches/gcc-5-branch/libstdc++-v3/testsuite/23_containers/deque/allocator/move.cc
branches/gcc-5-branch/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc
branches/gcc-5-branch/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc
branches/gcc-5-branch/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc
branches/gcc-5-branch/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/67707] [5/6 regression] Regression in std::move of std::deque with non-is_always_equal allocator
2015-09-24 9:01 [Bug c++/67707] New: Regression in std::move of std::deque with non-is_always_equal allocator rbd at debian dot org
` (4 preceding siblings ...)
2015-10-02 20:08 ` redi at gcc dot gnu.org
@ 2015-10-02 20:13 ` redi at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2015-10-02 20:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67707
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Version|unknown |5.1.0
Resolution|--- |FIXED
Target Milestone|--- |5.3
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-10-02 20:13 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-24 9:01 [Bug c++/67707] New: Regression in std::move of std::deque with non-is_always_equal allocator rbd at debian dot org
2015-09-24 9:40 ` [Bug libstdc++/67707] " trippels at gcc dot gnu.org
2015-09-24 12:09 ` [Bug libstdc++/67707] [5/6 regression] " redi at gcc dot gnu.org
2015-09-24 14:42 ` redi at gcc dot gnu.org
2015-09-24 15:47 ` redi at gcc dot gnu.org
2015-10-02 20:08 ` redi at gcc dot gnu.org
2015-10-02 20:13 ` redi at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).