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

--- Comment #14 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by H.J. Lu <h...@gcc.gnu.org>:

https://gcc.gnu.org/g:7dfb3a59fea4a9f423d62d8c604b6bd87cea6095

commit r16-3327-g7dfb3a59fea4a9f423d62d8c604b6bd87cea6095
Author: H.J. Lu <hjl.to...@gmail.com>
Date:   Wed Aug 20 12:45:18 2025 -0700

    x86-64: Emit the TLS call after NOTE_INSN_BASIC_BLOCK

    For a basic block with only a label:

    (code_label 78 11 77 3 14 (nil) [1 uses])
    (note 77 78 54 3 [bb 3] NOTE_INSN_BASIC_BLOCK)

    emit the TLS call after NOTE_INSN_BASIC_BLOCK, instead of before
    NOTE_INSN_BASIC_BLOCK, to avoid

    x.c: In function âaout_16_write_symsâ:
    x.c:54:1: error: NOTE_INSN_BASIC_BLOCK is missing for block 3
       54 | }
          | ^
    x.c:54:1: error: NOTE_INSN_BASIC_BLOCK 77 in middle of basic block 3
    during RTL pass: x86_cse
    x.c:54:1: internal compiler error: verify_flow_info failed

    gcc/

            PR target/121607
            * config/i386/i386-features.cc (ix86_emit_tls_call): Emit the
            TLS call after NOTE_INSN_BASIC_BLOCK in a basic block with only
            a label.

    gcc/testsuite/

            PR target/121607
            * gcc.target/i386/pr121607-1a.c: New test.
            * gcc.target/i386/pr121607-1b.c: Likewise.

    Signed-off-by: H.J. Lu <hjl.to...@gmail.com>

Reply via email to