diff options
author | Martin Liska <mliska@suse.cz> | 2020-06-09 13:03:55 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2020-06-09 14:35:43 +0200 |
commit | 4089df8ef4a63126b0774c39b6638845244c20d2 (patch) | |
tree | 37e0c330769dc4cfd24d1f1477b48f588e36f1dd /gcc/cif-code.def | |
parent | bb3ab62a8b4a108f01ea2eddfe31e9f733bd9cb6 (diff) | |
download | gcc-4089df8ef4a63126b0774c39b6638845244c20d2.zip gcc-4089df8ef4a63126b0774c39b6638845244c20d2.tar.gz gcc-4089df8ef4a63126b0774c39b6638845244c20d2.tar.bz2 |
sanitizer: do not inline no-sanitize into sanitizer fn
gcc/ChangeLog:
* cif-code.def (ATTRIBUTE_MISMATCH): Rename to...
(SANITIZE_ATTRIBUTE_MISMATCH): ...this.
* ipa-inline.c (sanitize_attrs_match_for_inline_p):
Handle all sanitizer options.
(can_inline_edge_p): Use renamed CIF_* enum value.
gcc/testsuite/ChangeLog:
* c-c++-common/asan/inline.c: New test.
* c-c++-common/asan/inline-kernel.c: New test.
* c-c++-common/tsan/inline.c: New test.
* c-c++-common/ubsan/inline.c: New test.
Diffstat (limited to 'gcc/cif-code.def')
-rw-r--r-- | gcc/cif-code.def | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/cif-code.def b/gcc/cif-code.def index 31c18c6..c65b247 100644 --- a/gcc/cif-code.def +++ b/gcc/cif-code.def @@ -128,9 +128,10 @@ DEFCIFCODE(OPTIMIZATION_MISMATCH, CIF_FINAL_ERROR, DEFCIFCODE(USES_COMDAT_LOCAL, CIF_FINAL_ERROR, N_("callee refers to comdat-local symbols")) -/* We can't inline because of mismatched caller/callee attributes. */ -DEFCIFCODE(ATTRIBUTE_MISMATCH, CIF_FINAL_ERROR, - N_("function attribute mismatch")) +/* We can't inline because of mismatched caller/callee + sanitizer attributes. */ +DEFCIFCODE(SANITIZE_ATTRIBUTE_MISMATCH, CIF_FINAL_ERROR, + N_("sanitizer function attribute mismatch")) /* We can't inline because the user requests only static functions but the function has external linkage for live patching purpose. */ |