[Bug target/112330] [14 Regression] LoongArch: Outputted .align directive may trigger assembler error with GAS 2.41

xry111 at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Nov 2 11:41:46 GMT 2023


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

Xi Ruoyao <xry111 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|build                       |
            Summary|[14 Regression] LoongArch:  |[14 Regression] LoongArch:
                   |Bootstrap failure with GAS  |Outputted .align directive
                   |2.41                        |may trigger assembler error
                   |                            |with GAS 2.41

--- Comment #15 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
(In reply to chenglulu from comment #14)

> First of all, if you add -mrelax during the assembly process,".align
> 16,54525952,4" will be based on the situation at the time of assembly, and
> the choice is to insert a nop function without insertion.But this ".align
> 16" will insert 3 nops unconditionally. When calculating the jump range of
> the conditional branch, gcc calculates the space required for .align
> according to the actual alignment.
> So after r14-4674 there will be an error.

Well, this indicates that the issue can be only triggered with some "bad luck".
 In fact with latest GCC trunk (r14-5075) this issue does not show up.

But this is an real issue and we need a fix anyway...


More information about the Gcc-bugs mailing list