From 2e11197a58d203018551f87817183132132abc2f Mon Sep 17 00:00:00 2001 From: Minseong Jang Date: Fri, 1 Apr 2022 02:31:12 +0900 Subject: [PATCH] Add `-fsanitize=float-divide-by-zero` option --- src/tests.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tests.rs b/src/tests.rs index 67b17d0..fb7be31 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -126,6 +126,7 @@ pub fn test_irgen(path: &Path) { // Compile c file: If fails, test is vacuously success if !Command::new("clang") .args(&[ + "-fsanitize=float-divide-by-zero", "-fsanitize=undefined", "-fno-sanitize-recover=all", &file_path, @@ -393,6 +394,7 @@ pub fn test_end_to_end(path: &Path) { // Compile c file: If fails, test is vacuously success if !Command::new("clang") .args(&[ + "-fsanitize=float-divide-by-zero", "-fsanitize=undefined", "-fno-sanitize-recover=all", &file_path,