diff options
author | Nathan Sidwell <nathan@acm.org> | 2021-02-22 07:43:56 -0800 |
---|---|---|
committer | Nathan Sidwell <nathan@acm.org> | 2021-02-22 07:51:45 -0800 |
commit | afed55036b65526be006d55f003f670ebeadb223 (patch) | |
tree | 39a327a5f54eae98a7b1bc99bbff81de1de18540 /libgcc/dfp-bit.c | |
parent | d789cf134b7e04ffd90e9512e3e591bd16dc6655 (diff) | |
download | gcc-afed55036b65526be006d55f003f670ebeadb223.zip gcc-afed55036b65526be006d55f003f670ebeadb223.tar.gz gcc-afed55036b65526be006d55f003f670ebeadb223.tar.bz2 |
c++: Recursing header imports and other duplicates [PR 99174]
The fix for 98741 introduced two issues. (a) recursive header units
iced because we tried to read the preprocessor state after having
failed to read the config. (b) we could have duplicate imports of
named modules in our pending queue, and that would lead to duplicate
requests for pathnames, which coupled with the use of a null-pathname
to indicate we'd asked could lead to desynchronization with the module
mapper. Fixed by adding a 'visited' flag to module state, so we ask
exactly once.
PR c++/99174
gcc/cp
* module.cc (struct module_state): Add visited_p flag.
(name_pending_imports): Use it to avoid duplicate requests.
(preprocess_module): Don't read preprocessor state if we failed to
load a module's config.
gcc/testsuite/
* g++.dg/modules/pr99174-1_a.C: New.
* g++.dg/modules/pr99174-1_b.C: New.
* g++.dg/modules/pr99174-1_c.C: New.
* g++.dg/modules/pr99174.H: New.
Diffstat (limited to 'libgcc/dfp-bit.c')
0 files changed, 0 insertions, 0 deletions