diff options
author | Richard Biener <rguenther@suse.de> | 2022-08-01 10:06:49 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2022-08-02 08:35:01 +0200 |
commit | bc7526f6fca0e6ac3bd462ae54170fa464539148 (patch) | |
tree | 0dbc870ae1c70c6167ef875355b6dec35caf5298 /gcc | |
parent | b9da686470d1c23929eefb401280ad8ba17e2a58 (diff) | |
download | gcc-bc7526f6fca0e6ac3bd462ae54170fa464539148.zip gcc-bc7526f6fca0e6ac3bd462ae54170fa464539148.tar.gz gcc-bc7526f6fca0e6ac3bd462ae54170fa464539148.tar.bz2 |
lto/106334 - fix previous fix wrt -flto-partition=none
This adjusts the assert guard to include -flto-partition=none which
behaves as WPA.
PR lto/106334
* dwarf2out.cc (dwarf2out_register_external_die): Adjust
assert.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/dwarf2out.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc index 3ac39c1..cfea9cf 100644 --- a/gcc/dwarf2out.cc +++ b/gcc/dwarf2out.cc @@ -6069,11 +6069,12 @@ dwarf2out_register_external_die (tree decl, const char *sym, if (!external_die_map) external_die_map = hash_map<tree, sym_off_pair>::create_ggc (1000); - /* When we do tree merging during WPA we can end up re-using GC memory - as there's currently no way to unregister external DIEs. Ideally - we'd register them only after merging finished but allowing override - here is easiest. See PR106334. */ - gcc_checking_assert (flag_wpa || !external_die_map->get (decl)); + /* When we do tree merging during WPA or with -flto-partition=none we + can end up re-using GC memory as there's currently no way to unregister + external DIEs. Ideally we'd register them only after merging finished + but allowing override here is easiest. See PR106334. */ + gcc_checking_assert (!(in_lto_p && !flag_wpa) + || !external_die_map->get (decl)); sym_off_pair p = { IDENTIFIER_POINTER (get_identifier (sym)), off }; external_die_map->put (decl, p); } |