diff options
author | Marek Polacek <polacek@redhat.com> | 2014-05-21 19:07:30 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2014-05-21 19:07:30 +0000 |
commit | 1edb7356d55721eb4160580ff6f42a1ad1269ced (patch) | |
tree | ecedb772a0e3b5484c52b54f1dc10a8a1f602023 /gcc/ubsan.c | |
parent | 289395899601bacfaa9f9f93c454b85337867c5b (diff) | |
download | gcc-1edb7356d55721eb4160580ff6f42a1ad1269ced.zip gcc-1edb7356d55721eb4160580ff6f42a1ad1269ced.tar.gz gcc-1edb7356d55721eb4160580ff6f42a1ad1269ced.tar.bz2 |
re PR sanitizer/61272 ([UBSAN] ICE in is_ubsan_builtin_p(tree_node*), gcc/ubsan.c:534)
PR sanitizer/61272
* ubsan.c (is_ubsan_builtin_p): Turn assert into a condition.
* g++.dg/ubsan/pr61272.C: New test.
From-SVN: r210723
Diffstat (limited to 'gcc/ubsan.c')
-rw-r--r-- | gcc/ubsan.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ubsan.c b/gcc/ubsan.c index 11461d0..585569c 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. */ |