From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10559 invoked by alias); 7 May 2014 18:10:48 -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 10512 invoked by uid 48); 7 May 2014 18:10:44 -0000 From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/60973] Invalid propagation of a tail call in devirt pass Date: Wed, 07 May 2014 18:10:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 4.10.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com 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: 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-05/txt/msg00573.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D60973 --- Comment #3 from Uro=C5=A1 Bizjak --- (In reply to Richard Biener from comment #1) > Index: gcc/tree-inline.c I have checked this patch on my target, where it fixes the runtime problem.= The optimized tree dump results in: int main(int, char**) (int argc, char * * argv) { int retval.0; struct C c; int _3; : C::C (&c); _3 =3D get_input (); retval.0_8 =3D C::foo (&c, _3); if (retval.0_8 !=3D 4) goto ; else goto ; : abort (); : c =3D{v} {CLOBBER}; return 0; } which expands to the correct RTL sequence. >>From gcc-bugs-return-450882-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed May 07 18:13:24 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 12762 invoked by alias); 7 May 2014 18:13:24 -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 12702 invoked by uid 48); 7 May 2014 18:13:20 -0000 From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/61082] [x86-64 Itanium ABI] g++ uses wrong return location for class with head padding Date: Wed, 07 May 2014 18:13: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: 4.9.0 X-Bugzilla-Keywords: ABI, wrong-code X-Bugzilla-Severity: major X-Bugzilla-Who: hjl.tools at gmail dot com 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: 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-05/txt/msg00574.txt.bz2 Content-length: 896 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61082 --- Comment #14 from H.J. Lu --- (In reply to David Greene from comment #13) > I see that 3.2.3 4 (b) is talking about considering adjacent fields in an > eightbyte. Is the intent to classify each eightbyte in an aggregate and > then consider each eightbyte separately for assigning argument and return > registers? That is correct. > The post-merger cleanup described in 5 appears to handle passing in memory > in that it considers all of the fields in the aggregate together. > > Given the above, if a field crosses an eightbyte either it is larger than an > eightbyte either it is unaligned which forces the whole argument to memory > or its eightbytes are classified separately in a recursive manner. > > Does this sound correct? If so, I think gcc is correct in what it's doing. I think GCC is correct.