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

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Nathaniel Shead
<nsh...@gcc.gnu.org>:

https://gcc.gnu.org/g:f0c3a1c16af234b55f48cf1cfe299417f93f163c

commit r14-10453-gf0c3a1c16af234b55f48cf1cfe299417f93f163c
Author: Nathaniel Shead <nathanielosh...@gmail.com>
Date:   Sun Jul 7 23:19:52 2024 +1000

    c++/modules: Conditionally start timer during lazy load [PR115165]

    While lazy loading, instantiation of pendings can sometimes recursively
    perform name lookup and begin further lazy loading.  When using the
    '-ftime-report' functionality this causes ICEs as we could start an
    already-running timer for the importing.

    This patch fixes the issue by using the 'timevar_cond*' API instead to
    support such recursive calls.

            PR c++/115165

    gcc/cp/ChangeLog:

            * module.cc (lazy_load_binding): Use 'timevar_cond*' APIs.
            (lazy_load_pendings): Likewise.

    gcc/testsuite/ChangeLog:

            * g++.dg/modules/timevar-1_a.H: New test.
            * g++.dg/modules/timevar-1_b.C: New test.

    Signed-off-by: Nathaniel Shead <nathanielosh...@gmail.com>

Reply via email to