public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/63993] New: vector::insert( make_move_iterator... ) broken by GLIBCXX_DEBUG.
@ 2014-11-20 12:00 pluto at agmk dot net
  2014-11-20 12:11 ` [Bug libstdc++/63993] " redi at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: pluto at agmk dot net @ 2014-11-20 12:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63993

            Bug ID: 63993
           Summary: vector::insert( make_move_iterator... ) broken by
                    GLIBCXX_DEBUG.
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pluto at agmk dot net

#include <iterator>
#include <string>
#include <vector>

int main()
{
    std::vector< std::string > v, t;
    t.push_back( "hello" );
    v.insert( v.end(), std::make_move_iterator( t.begin() ),
std::make_move_iterator( t.end() ) );
    t.clear();
}

% LANG=C
~/dvm/master/toolchain/gcc/sysroot/x86_64-gnu-linux/bin/x86_64-gnu-linux-g++
-Wall gcc-bug-new.cpp -std=c++11 -D_GLIBCXX_DEBUG=1


(...)
gcc-bug-new.cpp:9:97:   required from here
/home/pawels/dvm/master/toolchain/gcc/sysroot/x86_64-gnu-linux/x86_64-gnu-linux/include/c++/4.9.2/debug/functions.h:220:69:
error: invalid initialization of non-const reference of type
'std::__7::basic_string<char>&' from an rvalue of type
'std::__7::move_iterator<__gnu_debug::_Safe_iterator<__gnu_cxx::__7::__normal_iterator<std::__7::basic_string<char>*,
std::__cxx1998::__7::vector<std::__7::basic_string<char>,
std::__7::allocator<std::__7::basic_string<char> > > >,
std::__debug::vector<std::__7::basic_string<char> > > >::value_type {aka
std::__7::basic_string<char>}'
       return __foreign_iterator_aux4(__it, std::__addressof(*__other));
                                                                     ^
In file included from
/home/pawels/dvm/master/toolchain/gcc/sysroot/x86_64-gnu-linux/x86_64-gnu-linux/include/c++/4.9.2/debug/functions.h:36:0,
                 from
/home/pawels/dvm/master/toolchain/gcc/sysroot/x86_64-gnu-linux/x86_64-gnu-linux/include/c++/4.9.2/debug/debug.h:127,
                 from
/home/pawels/dvm/master/toolchain/gcc/sysroot/x86_64-gnu-linux/x86_64-gnu-linux/include/c++/4.9.2/bits/stl_iterator_base_funcs.h:65,
                 from
/home/pawels/dvm/master/toolchain/gcc/sysroot/x86_64-gnu-linux/x86_64-gnu-linux/include/c++/4.9.2/iterator:62,
                 from gcc-bug-new.cpp:1:
/home/pawels/dvm/master/toolchain/gcc/sysroot/x86_64-gnu-linux/x86_64-gnu-linux/include/c++/4.9.2/bits/move.h:47:5:
note: in passing argument 1 of '_Tp* std::__7::__addressof(_Tp&) [with _Tp =
std::__7::basic_string<char>]'
     __addressof(_Tp& __r) _GLIBCXX_NOEXCEPT
     ^


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libstdc++/63993] vector::insert( make_move_iterator... ) broken by GLIBCXX_DEBUG.
  2014-11-20 12:00 [Bug libstdc++/63993] New: vector::insert( make_move_iterator... ) broken by GLIBCXX_DEBUG pluto at agmk dot net
@ 2014-11-20 12:11 ` redi at gcc dot gnu.org
  2014-11-20 12:15 ` pluto at agmk dot net
  2014-11-20 12:22 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2014-11-20 12:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63993

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Isn't this PR 63500 ?

That is fixed in 4.9.2, so I don't think you're using 4.9.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libstdc++/63993] vector::insert( make_move_iterator... ) broken by GLIBCXX_DEBUG.
  2014-11-20 12:00 [Bug libstdc++/63993] New: vector::insert( make_move_iterator... ) broken by GLIBCXX_DEBUG pluto at agmk dot net
  2014-11-20 12:11 ` [Bug libstdc++/63993] " redi at gcc dot gnu.org
@ 2014-11-20 12:15 ` pluto at agmk dot net
  2014-11-20 12:22 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pluto at agmk dot net @ 2014-11-20 12:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63993

Pawel Sikora <pluto at agmk dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #2 from Pawel Sikora <pluto at agmk dot net> ---
ahh, yes. testcase was tested on the 4.9.2-prerelease.from 20140804.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libstdc++/63993] vector::insert( make_move_iterator... ) broken by GLIBCXX_DEBUG.
  2014-11-20 12:00 [Bug libstdc++/63993] New: vector::insert( make_move_iterator... ) broken by GLIBCXX_DEBUG pluto at agmk dot net
  2014-11-20 12:11 ` [Bug libstdc++/63993] " redi at gcc dot gnu.org
  2014-11-20 12:15 ` pluto at agmk dot net
@ 2014-11-20 12:22 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2014-11-20 12:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63993

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
That's why you're supposed to include the output of 'gcc -v'  :)


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-11-20 12:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-20 12:00 [Bug libstdc++/63993] New: vector::insert( make_move_iterator... ) broken by GLIBCXX_DEBUG pluto at agmk dot net
2014-11-20 12:11 ` [Bug libstdc++/63993] " redi at gcc dot gnu.org
2014-11-20 12:15 ` pluto at agmk dot net
2014-11-20 12:22 ` 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).