From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DA96D3858C98; Thu, 21 Mar 2024 14:54:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DA96D3858C98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711032864; bh=Pz5Uak2j78enLZf4XvG37CjGlPKQoIPd/Lf74lARga4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=cOenXlgorCTjkzblNjhFNtuSeA7rberrYb1YIEBm5ySTfNCB27JNW01jJP1zHjbfb b/XsMxCtIAexYoJ5xOM814vh98iTntNig0DVp4gOGhLymfu+acNQ+07LQWB9t0uhxV EM+3PhY8cjQH85S7njzL1uMHQVct6NjTzlJJee6Y= From: "ebotcazou at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/114416] SPARC V9 struct return with floating-point members violates ABI Date: Thu, 21 Mar 2024 14:54:24 +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: 14.0 X-Bugzilla-Keywords: ABI, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: ebotcazou at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114416 Eric Botcazou changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2024-03-21 Ever confirmed|0 |1 --- Comment #2 from Eric Botcazou --- IMO that's not clear: "Structure or union types are always left-justified, whether stored in registers or memory. The individual fields of a structure (or containing storage unit in the case of bit fields) are subject to promotion into regis= ters based on their type using the same rules as apply to scalar values (with the addition that a single-precision floating-point number assigned to the left half of an argument slot will be promoted into the corresponding even-numbe= red float register.). Any union type being passed directly is subject to promot= ion into the appropriate integer register(s)." I don't see how "The individual fields |...] are subject to promotion into registers based on their type using the same rules as apply to scalar value= s" applies to an array field, since its type is not scalar. Admittedly, this does not directly apply to a structure field either, but I think that GCC does apply the rule recursively in this case. AFAIK we have never implemented this interpretation for array fields, so I wonder whether it's not too late now.=