From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EDD8B38708D3; Wed, 22 Apr 2020 12:41:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EDD8B38708D3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587559281; bh=/AlDSAaShMq3eREpF/C/ur2aJldxM1ETFvXFTS3LjVc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mwUT+ZVplwzA0cnsp5G754v6Dq6S+ZQ5mOhruQEeAhSSRFGDPgiE4R9IiGCWzouPT 3NLMA496FnCPcUYWs9J7+oMyzLoxqhAxiWYiLQyc2Uavgwk67XVePHyw5KXfT+AVgI wH+Hi5zG15c2p58ye3PvR65+NX5ZpsJwRhSsKQDM= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/94704] [8/9/10 Regression] class with empty base passed incorrectly with -std=c++17 on s390x/s390 Date: Wed, 22 Apr 2020 12:41:21 +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: 10.0 X-Bugzilla-Keywords: ABI, wrong-code X-Bugzilla-Severity: blocker X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: krebbel at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.0 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-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 12:41:22 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94704 --- Comment #1 from Jakub Jelinek --- Completely untested guess: --- gcc/config/s390/s390.c.jj 2020-03-14 08:14:47.097741411 +0100 +++ gcc/config/s390/s390.c 2020-04-22 14:24:17.980091105 +0200 @@ -11917,7 +11917,8 @@ s390_function_arg_vector (machine_mode m for (field =3D TYPE_FIELDS (type); field; field =3D DECL_CHAIN (fiel= d)) { - if (TREE_CODE (field) !=3D FIELD_DECL) + if (TREE_CODE (field) !=3D FIELD_DECL + || cxx17_empty_base_field_p (field)) continue; if (single =3D=3D NULL_TREE) @@ -11967,7 +11968,8 @@ s390_function_arg_float (machine_mode mo for (field =3D TYPE_FIELDS (type); field; field =3D DECL_CHAIN (fiel= d)) { - if (TREE_CODE (field) !=3D FIELD_DECL) + if (TREE_CODE (field) !=3D FIELD_DECL + || cxx17_empty_base_field_p (field)) continue; if (single =3D=3D NULL_TREE) (on top of the today posted cxx17_empty_base_field_p patch). Though, of course that doesn't handle the -Wpsabi part if s390{,x} wants to emit such diagnostics; for that the functions or their caller should determ= ine if they would make a different ABI decisions if the field wouldn't be skipp= ed.=