summaryrefslogtreecommitdiff
path: root/gcc/convert.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/convert.c')
-rw-r--r--gcc/convert.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/convert.c b/gcc/convert.c
index af8dfda0eb4..429f988cbde 100644
--- a/gcc/convert.c
+++ b/gcc/convert.c
@@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see
#include "langhooks.h"
#include "builtins.h"
#include "ubsan.h"
+#include "asan.h"
#define maybe_fold_build1_loc(FOLD_P, LOC, CODE, TYPE, EXPR) \
((FOLD_P) ? fold_build1_loc (LOC, CODE, TYPE, EXPR) \
@@ -937,8 +938,7 @@ convert_to_integer_1 (tree type, tree expr, bool dofold)
return build1 (CONVERT_EXPR, type, expr);
case REAL_TYPE:
- if (flag_sanitize & SANITIZE_FLOAT_CAST
- && do_ubsan_in_current_function ())
+ if (sanitize_flags_p (SANITIZE_FLOAT_CAST))
{
expr = save_expr (expr);
tree check = ubsan_instrument_float_cast (loc, type, expr);