diff options
author | Nathan Sidwell <nathan@acm.org> | 2020-07-06 09:54:40 -0700 |
---|---|---|
committer | Nathan Sidwell <nathan@acm.org> | 2020-07-06 10:02:46 -0700 |
commit | e88218fd5a21e44c77c10dec87af4b11c76f34a0 (patch) | |
tree | ee1cbca72c47e5a0af0ae3e8193b043751aea610 /gcc/c | |
parent | f2151227dfe90a5fe73297c370786be98b0b090f (diff) | |
download | gcc-e88218fd5a21e44c77c10dec87af4b11c76f34a0.zip gcc-e88218fd5a21e44c77c10dec87af4b11c76f34a0.tar.gz gcc-e88218fd5a21e44c77c10dec87af4b11c76f34a0.tar.bz2 |
c++: Always use pushdecl for exception library helpers
The ABI exception helpers like __throw were being created by first
looking for them, and then adding if not found. Primarily because
libitm wasn't declaring them with the correct exception specifiers. I
fixed libitm a while back, so let's just use push_library_fn and let
the symbol table machinery deal with duplicates. push_library_fn was
making the assumtion there wasn't already a decl available, by always
returning the new decl. Bad things would happen if there was a
duplicate, because duplicate_decls explicitly gcc_frees the new decl.
Fixed by having it return whatever pushdecl returns.
gcc/cp/
* decl.c (push_library_fn): Return the decl pushdecl_toplevel returns.
* except.c (verify_library_fn): Replace with ...
(declare_library_fn_1): ... this fn. Always push the fn.
(declare_library_fn): Call it.
(build_throw): Call declare_library_fn_1.
gcc/testsuite/
* g++.dg/eh/builtin10.C: Adjust expected errors.
* g++.dg/eh/builtin11.C: Likewise.
* g++.dg/eh/builtin5.C: Likewise.
* g++.dg/eh/builtin6.C: Likewise.
* g++.dg/eh/builtin7.C: Likewise.
* g++.dg/eh/builtin9.C: Likewise.
* g++.dg/parse/crash55.C: Likewise.
Diffstat (limited to 'gcc/c')
0 files changed, 0 insertions, 0 deletions