diff options
author | Nathaniel Shead <nathanieloshead@gmail.com> | 2024-07-07 23:19:52 +1000 |
---|---|---|
committer | Nathaniel Shead <nathanieloshead@gmail.com> | 2024-07-18 13:07:32 +1000 |
commit | b7b2434cc7e712dc5055bde02c441393ae881f06 (patch) | |
tree | 3b45aad302d4f046f05c211093e86b77aa9278b5 /gcc/c-common.c | |
parent | 30dd420a06ad7d2adf4a672d176caee632f8168a (diff) | |
download | gcc-b7b2434cc7e712dc5055bde02c441393ae881f06.zip gcc-b7b2434cc7e712dc5055bde02c441393ae881f06.tar.gz gcc-b7b2434cc7e712dc5055bde02c441393ae881f06.tar.bz2 |
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 <nathanieloshead@gmail.com>
Diffstat (limited to 'gcc/c-common.c')
0 files changed, 0 insertions, 0 deletions