From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 56141385BF81; Thu, 9 Apr 2020 14:40:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 56141385BF81 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1586443206; bh=g3AW6i+DyjA7/JrpBQfTBaYK2d7AagSjdjf1LajeheM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=VYgzqgHTFn95wX42MnZ6Jecff/KtCbs/+OcdBOEu97lTOEpyTbjhBwE7jqJFBh6rU csshdFzte3aE/cOjrpHbsGAg6Tm09C7rs5a8Zlu5m8yGvCA7wV+U8l+xYcLUAxMwEn Mr19g9paPowr5q3vpcOsS21OziAp3aBNOXtL3YNg= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/94541] -mx32 gcc produces wrong code passing structs by value Date: Thu, 09 Apr 2020 14:40:06 +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: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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: cc 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: Thu, 09 Apr 2020 14:40:06 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94541 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek --- I don't have a -mx32 capable environment, so can't verify, but mmap/munmap shouldn't be inlined in any way, so can you reproduce if you replace mmap with foo and munmap with bar and define them like: static char c; __attribute__((noipa)) void * foo (void *addr, size_t length, int prot, int flags, int fd, off_t offset) { return (void *) &c; } __attribute__((noipa)) int bar (void *addr, size_t length) { if (addr !=3D (void *) &c) return -1; return 0; } or so? If yes, can you also drop errno from the testcase, and possibly drop unnecessary arguments to foo and/or bar as long as it reproduces? Once minimized that way, please preprocess it.=