summaryrefslogtreecommitdiff
path: root/gcc/ubsan.c
diff options
context:
space:
mode:
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2014-05-21 19:07:30 +0000
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2014-05-21 19:07:30 +0000
commit8e74a69c5bd64e020e691504a737599259b41bb8 (patch)
treeecedb772a0e3b5484c52b54f1dc10a8a1f602023 /gcc/ubsan.c
parent0ac81b0ef723e7d62ebca7c0778cab26a66290b1 (diff)
downloadlinaro-gcc-8e74a69c5bd64e020e691504a737599259b41bb8.tar.gz
linaro-gcc-8e74a69c5bd64e020e691504a737599259b41bb8.tar.bz2
linaro-gcc-8e74a69c5bd64e020e691504a737599259b41bb8.zip
PR sanitizer/61272
* ubsan.c (is_ubsan_builtin_p): Turn assert into a condition. * g++.dg/ubsan/pr61272.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210723 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ubsan.c')
-rw-r--r--gcc/ubsan.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ubsan.c b/gcc/ubsan.c
index 11461d00abd..585569c5810 100644
--- a/gcc/ubsan.c
+++ b/gcc/ubsan.c
@@ -531,9 +531,9 @@ ubsan_instrument_unreachable (location_t loc)
bool
is_ubsan_builtin_p (tree t)
{
- gcc_checking_assert (TREE_CODE (t) == FUNCTION_DECL);
- return strncmp (IDENTIFIER_POINTER (DECL_NAME (t)),
- "__builtin___ubsan_", 18) == 0;
+ return TREE_CODE (t) == FUNCTION_DECL
+ && strncmp (IDENTIFIER_POINTER (DECL_NAME (t)),
+ "__builtin___ubsan_", 18) == 0;
}
/* Expand UBSAN_NULL internal call. */