https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124056
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Uroš Bizjak from comment #3)
> Comment on attachment 63642 [details]
> gcc16-pr124056.patch
>
> >--- gcc/testsuite/gcc.target/i386/pr124056.c.jj 2026-02-10
> >17:51:25.191164967 +0100
> >+++ gcc/testsuite/gcc.target/i386/pr124056.c 2026-02-10 17:50:58.833610141
> >+0100
> >@@ -0,0 +1,56 @@
> >+/* PR middle-end/124056 */
> >+/* { dg-do run } */
> >+/* { dg-options "-O2 -masm=att" } */
>
> No need for -masm=att. The option selects assembly dialect of *generated*
> asm.
But the inline asm is in AT&T syntax, and if the rest would be emitted in Intel
syntax,
it wouldn't assemble unless .intel_syntax/.att_syntax is used.
> >+ __asm goto ("movl %1, %%ecx; test %%ecx, %%ecx; js 1f; jmp %l[lab]; 1:
> >cmpl $-1, %%ecx" :"=@ccz" (err) : "m" (v) : "ecx" : lab);
>
> Can this be reformated as:
>
> __asm goto ("movl %1, %%ecx\n\t"
> "test %%ecx, %%ecx\n\t"
> "js 1f\n\t"
> "jmp %l[lab]\n"
> "1:\tcmpl $-1, %%ecx"
> : "=@ccz" (err) : "m" (v) : "ecx" : lab);
Changed.
> >+ v = -2;
> >+ if (baz () != 0 || v != -2)
> >+ __builtin_abort ();
>
> return 0;
Not needed in C99 and later.