public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "greened at obbligato dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/61082] New: [x86-64 Itanium ABI] g++ uses wrong return location for class with head padding Date: Tue, 06 May 2014 19:04:00 -0000 [thread overview] Message-ID: <bug-61082-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61082 Bug ID: 61082 Summary: [x86-64 Itanium ABI] g++ uses wrong return location for class with head padding Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: greened at obbligato dot org Created attachment 32745 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32745&action=edit Testcase gcc appears to use the wrong sequence for returning an object with head padding. For the attached testcase, gcc -O2 generates the following code for function foo: .globl _Z3fooR1Y .type _Z3fooR1Y, @function _Z3fooR1Y: .LFB1019: .cfi_startproc movq 8(%rdi), %rax ret .cfi_endproc The class Y should be classified INTEGER under the x86-64 ABI. It has eight bytes of head padding because it inherits from an empty base class and has a member that also inherits from the same empty base class. By my reading of the ABI, foo should return the Y object in (RAX, RDX), with RDX containing the meaningful bits (the long value). The Intel compiler generates the code I would expect for this testcase.
next reply other threads:[~2014-05-06 19:04 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-05-06 19:04 greened at obbligato dot org [this message] 2014-05-07 2:08 ` [Bug c++/61082] " greened at obbligato dot org 2014-05-07 2:27 ` pinskia at gcc dot gnu.org 2014-05-07 10:27 ` redi at gcc dot gnu.org 2014-05-07 14:51 ` greened at obbligato dot org 2014-05-07 14:58 ` greened at obbligato dot org 2014-05-07 15:46 ` hjl.tools at gmail dot com 2014-05-07 16:05 ` greened at obbligato dot org 2014-05-07 17:07 ` hjl.tools at gmail dot com 2014-05-07 17:14 ` greened at obbligato dot org 2014-05-07 17:29 ` hjl.tools at gmail dot com 2014-05-07 17:47 ` greened at obbligato dot org 2014-05-07 18:02 ` greened at obbligato dot org 2014-05-07 20:08 ` greened at obbligato dot org 2014-05-08 7:54 ` rguenth at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-61082-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).