diff options
author | Nathaniel Shead <nathanieloshead@gmail.com> | 2024-01-26 16:55:52 +1100 |
---|---|---|
committer | Nathaniel Shead <nathanieloshead@gmail.com> | 2024-01-27 09:29:05 +1100 |
commit | ec57d183d35412aa5e0bcd7a448ccb75a4e1eab7 (patch) | |
tree | 55f45500a12c3e2afafa87190fae60fecfc754aa /gcc/tree-vect-patterns.cc | |
parent | 5a874dec6006357cca4e5f10a1c399157b96b837 (diff) | |
download | gcc-ec57d183d35412aa5e0bcd7a448ccb75a4e1eab7.zip gcc-ec57d183d35412aa5e0bcd7a448ccb75a4e1eab7.tar.gz gcc-ec57d183d35412aa5e0bcd7a448ccb75a4e1eab7.tar.bz2 |
c++: Stream additional fields for DECL_STRUCT_FUNCTION [PR113580]
Currently the DECL_STRUCT_FUNCTION for a declaration is always
reconstructed from scratch. This causes issues though, as some fields
used by other parts of the compiler (in this case, specifically
'function_{start,end}_locus') are then not correctly initialised. This
patch makes sure that these fields are also read and written.
PR c++/113580
gcc/cp/ChangeLog:
* module.cc (struct post_process_data): Create.
(trees_in::post_decls): Use.
(trees_in::post_process): Return entire vector at once.
Change overload to take post_process_data instead of tree.
(trees_out::write_function_def): Write needed flags from
DECL_STRUCT_FUNCTION.
(trees_in::read_function_def): Read them and pass to
post_process.
(module_state::read_cluster): Write flags into cfun.
gcc/testsuite/ChangeLog:
* g++.dg/modules/pr113580_a.C: New test.
* g++.dg/modules/pr113580_b.C: New test.
Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
Diffstat (limited to 'gcc/tree-vect-patterns.cc')
0 files changed, 0 insertions, 0 deletions