From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7332 invoked by alias); 27 Feb 2014 16:17:12 -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 7283 invoked by uid 48); 27 Feb 2014 16:17:08 -0000 From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/60336] empty struct value is passed differently in C and C++ Date: Thu, 27 Feb 2014 16:17:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.8.1 X-Bugzilla-Keywords: ABI, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com 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: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-02/txt/msg02757.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D60336 --- Comment #17 from Uro=C5=A1 Bizjak --- (In reply to Jason Merrill from comment #15) > That only documents that sizeof is different for C and C++, the calling > convention should be the same. And it seems like classify_argument should > already be returning 1 with classes[0]=3D=3DNO_CLASS for both C and C++. = Why > are we getting different results? classify_argument has an early exit: /* Zero sized arrays or structures are NO_CLASS. We return 0 to signalize memory class, so handle it as special case. */ if (!words) { classes[0] =3D X86_64_NO_CLASS; return 1; } but it doesn't trigger for c++, where words gets calculated as 1. >>From gcc-bugs-return-445001-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Feb 27 16:21:36 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 16567 invoked by alias); 27 Feb 2014 16:21:35 -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 16487 invoked by uid 55); 27 Feb 2014 16:21:32 -0000 From: "jason at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/60353] [4.9 Regression] Firefox build failure #3 caused by r208157 Date: Thu, 27 Feb 2014 16:21: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: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: jason at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.0 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-02/txt/msg02758.txt.bz2 Content-length: 495 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60353 --- Comment #2 from Jason Merrill --- Author: jason Date: Thu Feb 27 16:20:59 2014 New Revision: 208200 URL: http://gcc.gnu.org/viewcvs?rev=208200&root=gcc&view=rev Log: PR c++/60353 PR c++/55877 * decl2.c (tentative_decl_linkage): Don't mess with functions that are not yet defined. Added: trunk/gcc/testsuite/g++.dg/other/anon6.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/decl2.c