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

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jakub Jelinek
<ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:072b2cdb620767c283f1329e95c7d4d35686596e

commit r10-11363-g072b2cdb620767c283f1329e95c7d4d35686596e
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Fri Feb 3 21:37:27 2023 +0100

    fortran: Fix up hash table usage in gfc_trans_use_stmts [PR108451]

    The first testcase in the PR (which I haven't included in the patch because
    it is unclear to me if it is supposed to be valid or not) ICEs since extra
    hash table checking has been added recently.  The problem is that
    gfc_trans_use_stmts does
              tree *slot = entry->decls->find_slot_with_hash (rent->use_name,
hash,
                                                              INSERT);
              if (*slot == NULL)
    and later on doesn't store anything into *slot and continues.  Another spot
    a few lines later correctly clears the slot if it decides not to use the
    slot, so the following patch does the same.

    2023-02-03  Jakub Jelinek  <ja...@redhat.com>

            PR fortran/108451
            * trans-decl.c (gfc_trans_use_stmts): Call clear_slot before
            doing continue.

    (cherry picked from commit 76f7f0eddcb7c418d1ec3dea3e2341ca99097301)

Reply via email to