[Bug libstdc++/44190] Debug vector resize does not update capacity

2010-05-19 Thread mikpe at it dot uu dot se


--- Comment #6 from mikpe at it dot uu dot se  2010-05-19 11:43 ---
This bug also affects 4.5 and 4.4, but not 4.3, making it a regression from
4.3. The fix for 4.6 backports cleanly to 4.5 and with minor fuzz to 4.4, and
has been verified to fix the problem on those branches too with no new
testsuite regressions (bootstrapped + regtested on i686-linux).


-- 


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



[Bug libstdc++/44190] Debug vector resize does not update capacity

2010-05-19 Thread paolo dot carlini at oracle dot com


--- Comment #7 from paolo dot carlini at oracle dot com  2010-05-19 11:50 
---
How it can possibly not affect 4.3? The code is exactly the same.


-- 


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



[Bug libstdc++/44190] Debug vector resize does not update capacity

2010-05-19 Thread mikpe at it dot uu dot se


--- Comment #8 from mikpe at it dot uu dot se  2010-05-19 11:57 ---
I just compiled the original test case with 4.5, 4.4, and 4.3, and the assert
didn't trigger when compiled with 4.3. I didn't investigate any further.


-- 


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



[Bug libstdc++/44190] Debug vector resize does not update capacity

2010-05-19 Thread paolo dot carlini at oracle dot com


--- Comment #9 from paolo dot carlini at oracle dot com  2010-05-19 12:01 
---
Given the identical resize code, missing a real analysis of why the patch is
needed in mainline and isn't in 4.3, I don't feel comfortable committing the
patch to the older branches, since nobody else complained so far and in general
the pedantic mode is much less used.


-- 


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



[Bug libstdc++/44190] Debug vector resize does not update capacity

2010-05-19 Thread paolo dot carlini at oracle dot com


--- Comment #10 from paolo dot carlini at oracle dot com  2010-05-19 12:06 
---
Ok, now I see, vector::capacity itself has been changed between 4.3 and 4.4.
Let's apply the patch to 4.5 too.


-- 


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



[Bug libstdc++/44190] Debug vector resize does not update capacity

2010-05-19 Thread paolo at gcc dot gnu dot org


--- Comment #11 from paolo at gcc dot gnu dot org  2010-05-19 12:09 ---
Subject: Bug 44190

Author: paolo
Date: Wed May 19 12:08:53 2010
New Revision: 159560

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=159560
Log:
2010-05-19  Eelis van der Weegen  gcc-bugzi...@contacts.eelis.net

PR libstdc++/44190
* include/debug/vector (vector::resize): Call
_M_update_guaranteed_capacity.
* testsuite/23_containers/vector/capacity/44190.cc: New.

Added:
   
branches/gcc-4_5-branch/libstdc++-v3/testsuite/23_containers/vector/capacity/44190.cc
Modified:
branches/gcc-4_5-branch/libstdc++-v3/ChangeLog
branches/gcc-4_5-branch/libstdc++-v3/include/debug/vector


-- 


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



[Bug libstdc++/44190] Debug vector resize does not update capacity

2010-05-19 Thread paolo dot carlini at oracle dot com


-- 

paolo dot carlini at oracle dot com changed:

   What|Removed |Added

   Target Milestone|4.6.0   |4.5.1


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



[Bug libstdc++/44190] Debug vector resize does not update capacity

2010-05-19 Thread mikpe at it dot uu dot se


--- Comment #12 from mikpe at it dot uu dot se  2010-05-19 12:29 ---
(In reply to comment #10)
 Let's apply the patch to 4.5 too.

Thanks!


-- 


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



[Bug libstdc++/44190] Debug vector resize does not update capacity

2010-05-18 Thread gcc-bugzilla at contacts dot eelis dot net


--- Comment #1 from gcc-bugzilla at contacts dot eelis dot net  2010-05-18 
21:45 ---
Created an attachment (id=20695)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20695action=view)
Trivial patch that fixes the problem.

The problem was just a missing call to _M_update_guaranteed_capacity().


-- 


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



[Bug libstdc++/44190] Debug vector resize does not update capacity

2010-05-18 Thread paolo dot carlini at oracle dot com


-- 

paolo dot carlini at oracle dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-05-18 22:12:31
   date||


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



[Bug libstdc++/44190] Debug vector resize does not update capacity

2010-05-18 Thread paolo dot carlini at oracle dot com


--- Comment #2 from paolo dot carlini at oracle dot com  2010-05-18 23:36 
---
I'm going to apply the patch: could you please provide name and family name for
the ChangeLog entry? Thanks!


-- 

paolo dot carlini at oracle dot com changed:

   What|Removed |Added

 CC||paolo dot carlini at oracle
   ||dot com


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



[Bug libstdc++/44190] Debug vector resize does not update capacity

2010-05-18 Thread gcc-bugzilla at contacts dot eelis dot net


--- Comment #3 from gcc-bugzilla at contacts dot eelis dot net  2010-05-18 
23:38 ---
(In reply to comment #2)
 I'm going to apply the patch

Great, thanks! :)

 could you please provide name and family name for
 the ChangeLog entry?

It's Eelis van der Weegen


-- 


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



[Bug libstdc++/44190] Debug vector resize does not update capacity

2010-05-18 Thread paolo at gcc dot gnu dot org


--- Comment #4 from paolo at gcc dot gnu dot org  2010-05-18 23:59 ---
Subject: Bug 44190

Author: paolo
Date: Tue May 18 23:58:50 2010
New Revision: 159549

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=159549
Log:
2010-05-18  Eelis van der Weegen  gcc-bugzi...@contacts.eelis.net

PR libstdc++/44190
* include/debug/vector (vector::resize): Call
_M_update_guaranteed_capacity.
* testsuite/23_containers/vector/capacity/44190.cc: New.

Added:
trunk/libstdc++-v3/testsuite/23_containers/vector/capacity/44190.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/debug/vector


-- 


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



[Bug libstdc++/44190] Debug vector resize does not update capacity

2010-05-18 Thread paolo dot carlini at oracle dot com


--- Comment #5 from paolo dot carlini at oracle dot com  2010-05-19 00:00 
---
Fixed.


-- 

paolo dot carlini at oracle dot com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.6.0


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