https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118940
Sam James <sjames at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |liuhongt at gcc dot gnu.org
Summary|[15 regression] [x86] |[15 regression] [x86]
|Failure to build ipxe |Failure to build ipxe
|(inline assembly fails with |(inline assembly fails with
|'asm' operand has |'asm' operand has
|impossible constraints or |impossible constraints or
|there are not enough |there are not enough
|registers) |registers) since
| |r15-2217-ga3f03891065cb9
--- Comment #1 from Sam James <sjames at gcc dot gnu.org> ---
(In reply to Miao Wang from comment #0)
> Created attachment 60532 [details]
> The code failed to compile with gcc-15
>
> GCC 15 fails to compile [ipxe](https://ipxe.org). The error happens on
> handling the inline assembly code included by src/tests/bigint_test.c,
> reporting that 'asm' operand has impossible constraints or there are not
> enough registers. However, GCC 14 can successfully compile the code.
>
> I tried to simplify the case, and I finally get the attached C code. The
> code fails to compile using the command:
>
> gcc -Wall -Wextra -g -Os -march=i386 -mregparm=3 -m32 -fno-PIE -c src.c
> -o /dev/null
>
> The symptom can be reproduced on godbolt: https://godbolt.org/z/MbjMc3TKc
>
> I did a bisect on the gcc code, and found out that the compilation can
> succeed before the commit a3f03891065c ("Relax ix86_hardreg_mov_ok after
> split1.").
>
r15-2217-ga3f03891065cb9