From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24433 invoked by alias); 26 Feb 2014 20:41:15 -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 24405 invoked by uid 48); 26 Feb 2014 20:41:11 -0000 From: "trippels at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/60347] [4.9 Regression] r208153 breaks Firefox build Date: Wed, 26 Feb 2014 20:41: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: X-Bugzilla-Severity: normal X-Bugzilla-Who: trippels at gcc dot gnu.org 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: priority bug_status cf_reconfirmed_on assigned_to everconfirmed 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/msg02646.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D60347 Markus Trippelsdorf changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P1 |P3 Status|ASSIGNED |UNCONFIRMED Last reconfirmed|2014-02-26 00:00:00 | Assignee|jason at gcc dot gnu.org |unassigned at gcc d= ot gnu.org Ever confirmed|1 |0 --- Comment #3 from Markus Trippelsdorf --- markus@x4 html % cat test.ii template class nsRefPtr { T *mRawPtr; public: typedef T element_type; ~nsRefPtr() { mRawPtr->Release; } }; class nsSlots { public: virtual ~nsSlots(); }; class A; class B : nsSlots { nsRefPtr mContainingShadow; }; markus@x4 html % g++ -O2 -c test.ii test.ii: In instantiation of =E2=80=98nsRefPtr::~nsRefPtr() [with T =3D = A]=E2=80=99: test.ii:14:7: required from here test.ii:6:17: error: invalid use of incomplete type =E2=80=98class A=E2=80= =99 ~nsRefPtr() { mRawPtr->Release; } ^ test.ii:13:7: error: forward declaration of =E2=80=98class A=E2=80=99 class A; ^ >>From gcc-bugs-return-444891-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Feb 26 20:47:48 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 31492 invoked by alias); 26 Feb 2014 20:47:47 -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 31438 invoked by uid 48); 26 Feb 2014 20:47:44 -0000 From: "hjl.tools 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: Wed, 26 Feb 2014 20:47: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: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools 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: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-02/txt/msg02648.txt.bz2 Content-length: 755 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336 --- Comment #14 from H.J. Lu --- (In reply to H.J. Lu from comment #13) > Passing > > struct dummy { }; > > is still odd for g++. It is supposed to have a single member of type char, > which should be passed in register, not on stack. This passes it in register: diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 00773d8..6975ff1 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -6613,6 +6613,8 @@ classify_argument (enum machine_mode mode, const_tree type, return 0; } } + if (mode == QImode && words == 1 && classes[0] == X86_64_NO_CLASS) + classes[0] = X86_64_INTEGERSI_CLASS; return words; }