summaryrefslogtreecommitdiff
path: root/gcc/ubsan.h
diff options
context:
space:
mode:
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2013-12-05 18:03:44 +0000
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2013-12-05 18:03:44 +0000
commit457e2f498d5d14836125315ddf51b24e985542cc (patch)
treed6c513523dadd6906703a923781d3f66bc4ebeee /gcc/ubsan.h
parentcf6458c391ac0ebec5551104e2f3d19676f9f247 (diff)
downloadgcc-457e2f498d5d14836125315ddf51b24e985542cc.tar.gz
PR sanitizer/59333
PR sanitizer/59397 * ubsan.c: Include rtl.h and expr.h. (ubsan_encode_value): Add new parameter. If expanding, assign a stack slot for DECL_RTL of the temporary and call expand_assignment. Handle BOOLEAN_TYPE and ENUMERAL_TYPE. (ubsan_build_overflow_builtin): Adjust ubsan_encode_value call. * ubsan.h (ubsan_encode_value): Adjust declaration. * internal-fn.c (ubsan_expand_si_overflow_addsub_check): Move ubsan_build_overflow_builtin above expand_normal call. Surround this call with push_temp_slots and pop_temp_slots. (ubsan_expand_si_overflow_neg_check): Likewise. (ubsan_expand_si_overflow_mul_check): Likewise. testsuite/ * c-c++-common/ubsan/pr59333.c: New test. * c-c++-common/ubsan/pr59397.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205714 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ubsan.h')
-rw-r--r--gcc/ubsan.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ubsan.h b/gcc/ubsan.h
index 0aced4aac67..fa7698509c4 100644
--- a/gcc/ubsan.h
+++ b/gcc/ubsan.h
@@ -41,7 +41,7 @@ extern tree ubsan_instrument_unreachable (location_t);
extern tree ubsan_create_data (const char *, location_t,
const struct ubsan_mismatch_data *, ...);
extern tree ubsan_type_descriptor (tree, bool);
-extern tree ubsan_encode_value (tree);
+extern tree ubsan_encode_value (tree, bool = false);
extern bool is_ubsan_builtin_p (tree);
extern tree ubsan_build_overflow_builtin (tree_code, location_t, tree, tree, tree);