public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/54392] New: [4.6/4.7/4.8 Regression] std::string::append() fails to update length
@ 2012-08-28 13:42 redi at gcc dot gnu.org
  2012-08-28 18:03 ` [Bug libstdc++/54392] " hjl.tools at gmail dot com
                   ` (27 more replies)
  0 siblings, 28 replies; 29+ messages in thread
From: redi at gcc dot gnu.org @ 2012-08-28 13:42 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54392

             Bug #: 54392
           Summary: [4.6/4.7/4.8 Regression] std::string::append() fails
                    to update length
    Classification: Unclassified
           Product: gcc
           Version: 4.6.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: redi@gcc.gnu.org


#include <string>
#include <cassert>

int main()
{
    std::string s1, s2;
    s1.assign(s2.c_str(), 1);
    assert( s1.size() == 1 );
}

This test passes with G++ 4.4, but in 4.5 and later string::assign(const char*,
size_type) doesn't mutate the string but tries to work in-place on the empty
rep, then tries (and fails) to set the length of the empty rep to 1.


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

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

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-28 13:42 [Bug libstdc++/54392] New: [4.6/4.7/4.8 Regression] std::string::append() fails to update length redi at gcc dot gnu.org
2012-08-28 18:03 ` [Bug libstdc++/54392] " hjl.tools at gmail dot com
2012-08-28 18:10 ` redi at gcc dot gnu.org
2012-08-29  7:36 ` [Bug libstdc++/54392] [4.6/4.7/4.8 Regression] std::string::assign() " redi at gcc dot gnu.org
2012-08-29 10:50 ` michael.haubenwallner at salomon dot at
2012-08-29 14:16 ` paolo.carlini at oracle dot com
2012-08-29 14:47 ` paolo.carlini at oracle dot com
2012-08-29 15:14 ` paolo.carlini at oracle dot com
2012-08-29 15:21 ` michael.haubenwallner at salomon dot at
2012-08-29 15:29 ` paolo.carlini at oracle dot com
2012-08-29 15:33 ` paolo.carlini at oracle dot com
2012-08-29 16:21 ` paolo.carlini at oracle dot com
2012-08-29 16:53 ` paolo.carlini at oracle dot com
2012-08-29 23:21 ` paolo.carlini at oracle dot com
2012-08-30  7:33 ` michael.haubenwallner at salomon dot at
2012-08-31 16:52 ` paolo.carlini at oracle dot com
2012-09-06 14:44 ` rguenth at gcc dot gnu.org
2012-09-07 10:45 ` rguenth at gcc dot gnu.org
2013-01-11 15:58 ` jakub at gcc dot gnu.org
2013-01-11 16:01 ` paolo.carlini at oracle dot com
2013-01-11 16:04 ` paolo.carlini at oracle dot com
2013-01-11 18:59 ` redi at gcc dot gnu.org
2013-01-31 10:06 ` paolo.carlini at oracle dot com
2013-04-12 15:17 ` [Bug libstdc++/54392] [4.7/4.8/4.9 " jakub at gcc dot gnu.org
2014-03-04 11:45 ` jakub at gcc dot gnu.org
2014-03-04 12:02 ` redi at gcc dot gnu.org
2014-06-12 13:48 ` [Bug libstdc++/54392] [4.7/4.8/4.9/4.10 " rguenth at gcc dot gnu.org
2014-09-19 13:26 ` [Bug libstdc++/54392] [4.8/4.9/5 " redi at gcc dot gnu.org
2014-12-22 13:51 ` 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).