From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18193 invoked by alias); 2 Sep 2014 15:47:42 -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 18108 invoked by uid 48); 2 Sep 2014 15:47:37 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/62306] [4.9/5 Regression?] Change in the comdat used for constructors Date: Tue, 02 Sep 2014 15:47:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW 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: Message-ID: In-Reply-To: References: 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-09/txt/msg00863.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62306 --- Comment #5 from Jakub Jelinek --- You could e.g. implement the dtors as: _Z...D0...: set some hard reg to 0 tail call some function _Z...D1...: set some hard reg to 1 tail call some function _Z...D2...: set some hard reg to 2 tail call some function and that function would just have a magic extra argument, if the same in between all levels would not use it at all, otherwise could e.g. have if (extra == 0) delete ...; at the end, etc. My memory is fuzzy on it after all the years, but as the comdat names are part of the ABI, I think the idea was to allow implementations to choose how to implement it while staying interoperable. So, if g++ 4.[569]/5 emit it in D5, I think that is how it was meant, and what should be done.