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

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by David Malcolm
<dmalc...@gcc.gnu.org>:

https://gcc.gnu.org/g:70f911bf547326a7b9ae6e116c65c22ce0cd0e65

commit r14-10855-g70f911bf547326a7b9ae6e116c65c22ce0cd0e65
Author: David Malcolm <dmalc...@redhat.com>
Date:   Wed Oct 30 16:11:40 2024 -0400

    jit: reset state in varasm.cc [PR117275]

    PR jit/117275 reports various jit test failures seen on
    powerpc64le-unknown-linux-gnu due to hitting this assertion
    in varasm.cc on the 2nd compilation in a process:

    #2  0x00007ffff63e67d0 in assemble_external_libcall (fun=0x7ffff2a4b1d8)
        at ../../src/gcc/varasm.cc:2650
    2650          gcc_assert (!pending_assemble_externals_processed);
    (gdb) p pending_assemble_externals_processed
    $1 = true

    We're not properly resetting state in varasm.cc after a compile
    for libgccjit.

    Fixed thusly.

    gcc/ChangeLog:
            PR jit/117275
            * toplev.cc (toplev::finalize): Call varasm_cc_finalize.
            * varasm.cc (varasm_cc_finalize): New.
            * varasm.h (varasm_cc_finalize): New decl.

    Signed-off-by: David Malcolm <dmalc...@redhat.com>
    (cherry picked from commit 779c0390e3b57d1eebd41bbfe43d1f329c91de6c)
    Signed-off-by: David Malcolm <dmalc...@redhat.com>

Reply via email to