From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3151 invoked by alias); 23 Jul 2014 20:07:17 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 3094 invoked by uid 48); 23 Jul 2014 20:07:11 -0000 From: "fdumont at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/61667] setting max_load_factor of unordered_map cause buckets shrink Date: Wed, 23 Jul 2014 20:07:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 4.8.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fdumont at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: fdumont at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-07/txt/msg01580.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D61667 Fran=C3=A7ois Dumont changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |fdumont at gcc dot = gnu.org --- Comment #2 from Fran=C3=A7ois Dumont --- I just wanted to give a way to shrink unordered containers representation through a rehash call as long as it was Standard compliant, and it is I thi= nk. Even the classic copy and swap won't work on this type of container. Having= it shrink on call to max_load_factor was also plan but I must confess that in = the provided code it is quite inconvenient. An easy workaround is to call m.reserve(200000) after the call to max_load_factor. I can change the code to limit the shink behavior to rehash calls or I can change it to do as you propose Jonathan allowing no shrinking except by rebuilding a new instance from an iterator range and then swap. >>From gcc-bugs-return-456990-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jul 23 20:17:18 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 10306 invoked by alias); 23 Jul 2014 20:17:17 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 10246 invoked by uid 48); 23 Jul 2014 20:17:10 -0000 From: "zsojka at seznam dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/61890] New: [4.10 Regression] g++.dg/ipa/devirt-23.C FAILs with -O2 -fno-devirtualize-speculatively -fno-guess-branch-probability Date: Wed, 23 Jul 2014 20:17:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 4.10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: zsojka at seznam dot cz X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-07/txt/msg01581.txt.bz2 Content-length: 820 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61890 Bug ID: 61890 Summary: [4.10 Regression] g++.dg/ipa/devirt-23.C FAILs with -O2 -fno-devirtualize-speculatively -fno-guess-branch-probability Product: gcc Version: 4.10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Created attachment 33178 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33178&action=edit preprocessed source (g++.dg/ipa/devirt-23.C) Output: $ g++ -O2 -fno-devirtualize-speculatively -fno-guess-branch-probability devirt-23.ii $ ./a.out Aborted Tested revisions: trunk r212932 - FAIL 4_9 r212703 - OK