/* { dg-do compile { target { ! x32 } } } */
/* { dg-options "-fcheck-pointer-bounds -mmpx -fsanitize=bounds" } */
-/* { dg-error "-fcheck-pointer-bounds is not supported with -fsanitize=bounds" "" { target *-*-* } 0 } */
+/* { dg-error "-fcheck-pointer-bounds is not supported with Undefined Behavior Sanitizer" "" { target *-*-* } 0 } */
enum {} a[0];
void fn1(int);
flag_check_pointer_bounds = 0;
}
- if (flag_sanitize & SANITIZE_ADDRESS)
+ if (flag_sanitize)
{
- error_at (UNKNOWN_LOCATION,
- "-fcheck-pointer-bounds is not supported with "
- "Address Sanitizer");
- flag_check_pointer_bounds = 0;
- }
+ 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");
- if (flag_sanitize & SANITIZE_BOUNDS)
- {
- error_at (UNKNOWN_LOCATION,
- "-fcheck-pointer-bounds is not supported with "
- "-fsanitize=bounds");
flag_check_pointer_bounds = 0;
}
-
}
/* One region RA really helps to decrease the code size. */