From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AA5123938C3A; Fri, 30 Apr 2021 06:55:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AA5123938C3A From: "iains at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/100340] Bootstrap fails with Clang 12.0.5 (XCode 12.5) Date: Fri, 30 Apr 2021 06:55:00 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: 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: Fri, 30 Apr 2021 06:55:00 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100340 --- Comment #6 from Iain Sandoe --- (In reply to Richard Biener from comment #5) > Does it work when you use STAGE1_CFLAGS=3D"-O0" (I think clang defaults to > optimizing?). To rule out compare-debug issues also try > --without-build-config The reason for the fail is that the assembler (clang -cc1as) is assembling branch instructions with differing lengths between the debug and non-debug cases. The code is not actually wrong in either case - it simply looks like branch relaxation has been enabled in one case and not the other. However this is not in response to changed command line options (so it is an internal decision in the assembler, probably as a result of detecting either .loc directives or presence/absence of Lxxxx local labels between branch and its destination.). I am discussing with OSS folks at Apple whether this is an intentional chan= ge (i.e to produce better optimised code) or an accidental one. Short-term workarounds: 1. (re-)install xcode 12.4 command line tools and select them for use 2. disable debug comparison in the bootstrap ( --without-build-config )=