https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100340

--- Comment #6 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #5)
> Does it work when you use STAGE1_CFLAGS="-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 change
(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 )

Reply via email to