if (targetm.chkp_bound_mode () == VOIDmode)
{
error_at (UNKNOWN_LOCATION,
- "-fcheck-pointer-bounds is not supported for this target");
+ "%<-fcheck-pointer-bounds%> is not supported for this "
+ "target");
flag_check_pointer_bounds = 0;
}
- if (flag_sanitize)
+ if (flag_sanitize & SANITIZE_BOUNDS_STRICT)
{
- if (flag_sanitize & SANITIZE_ADDRESS)
- error_at (UNKNOWN_LOCATION,
- "-fcheck-pointer-bounds is not supported with "
- "Address Sanitizer");
-
- if (flag_sanitize & (SANITIZE_UNDEFINED | SANITIZE_NONDEFAULT))
- error_at (UNKNOWN_LOCATION,
- "-fcheck-pointer-bounds is not supported with "
- "Undefined Behavior Sanitizer");
-
- if (flag_sanitize & SANITIZE_LEAK)
- error_at (UNKNOWN_LOCATION,
- "-fcheck-pointer-bounds is not supported with "
- "Leak Sanitizer");
-
- if (flag_sanitize & SANITIZE_THREAD)
- error_at (UNKNOWN_LOCATION,
- "-fcheck-pointer-bounds is not supported with "
- "Thread Sanitizer");
+ error_at (UNKNOWN_LOCATION,
+ "%<-fcheck-pointer-bounds%> is not supported with "
+ "%<-fsanitize=bounds-strict%>");
+ flag_check_pointer_bounds = 0;
+ }
+ else if (flag_sanitize & SANITIZE_BOUNDS)
+ {
+ error_at (UNKNOWN_LOCATION,
+ "%<-fcheck-pointer-bounds%> is not supported with "
+ "%<-fsanitize=bounds%>");
+ flag_check_pointer_bounds = 0;
+ }
+
+ if (flag_sanitize & SANITIZE_ADDRESS)
+ {
+ error_at (UNKNOWN_LOCATION,
+ "%<-fcheck-pointer-bounds%> is not supported with "
+ "Address Sanitizer");
+ flag_check_pointer_bounds = 0;
+ }
+
+ if (flag_sanitize & SANITIZE_THREAD)
+ {
+ error_at (UNKNOWN_LOCATION,
+ "%<-fcheck-pointer-bounds%> is not supported with "
+ "Thread Sanitizer");
flag_check_pointer_bounds = 0;
}
FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (rhs), cnt, field, val)
{
- if (chkp_type_has_pointer (TREE_TYPE (field)))
+ if (field && chkp_type_has_pointer (TREE_TYPE (field)))
{
tree lhs_field = chkp_build_component_ref (lhs, field);
chkp_walk_pointer_assignments (lhs_field, val, arg, handler);