From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ACD0C398B847; Wed, 21 Apr 2021 20:38:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ACD0C398B847 From: "iains at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/100152] Possible 10.3 bad code generation regression from 10.2/9.3 on Mac OS 10.15.7 (Catalina) Date: Wed, 21 Apr 2021 20:38:23 +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.3.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: iains 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: --- 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, 21 Apr 2021 20:38:23 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100152 --- Comment #22 from Iain Sandoe --- so it looks like the contents of r10 are being trashed by the call to ___UTF_8_put (the first call goes through the dylib lazy symbol resolution = and that leaves r10 with a value pointing to some mutex). When we return from ___UTF_8_put there's a test for the loop iteration whic= h is expecting that to be the value in r10. The test is for equality which fails for the silly value now in r10 and we try a second loop iteration. That starts with the "movl (%rbp,%r10,4), %esi" - but r10 now has a value that can't be used. So .... I don't know if this is a new problem or an old problem that has be= en exposed by changes in the RA ..=20 .. if there's any easy way to amend the build process to attempt modificati= ons of the build flags to that file - this could give you a work-around in the short term.=