From b4782bd9194e44d032b4e605c983df06372fa216 Mon Sep 17 00:00:00 2001 From: shockrah Date: Tue, 5 Nov 2019 14:42:53 -0800 Subject: [PATCH] proper div by zero in test case --- tests.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests.c b/tests.c index ac3e99a..fa08f9d 100644 --- a/tests.c +++ b/tests.c @@ -5,9 +5,8 @@ void divide_by_zero() { // here we can test the divide by zero without gcc noticing - int x = 0; - int y = 5; - int z = y/x; + __asm__("mov eax, 0"); + __asm__("div al"); } void test_serial_write() {