From e2e4e4f07e8bf8c8f9e16bbece62c492070d1051 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Mon, 15 May 2006 14:00:23 +0000 Subject: Try harder to trigger an exception. On architectures where floating-point exceptions are deferred, we might not see the exception before another floating-point instruction is executed. This is especially true on the i387 where we don't see underflow/overflow until the result is stored into memory. --- regress/lib/libc/ieeefp/except/except.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/regress/lib/libc/ieeefp/except/except.c b/regress/lib/libc/ieeefp/except/except.c index 22bd6809a85..1d118777775 100644 --- a/regress/lib/libc/ieeefp/except/except.c +++ b/regress/lib/libc/ieeefp/except/except.c @@ -1,4 +1,4 @@ -/* $OpenBSD: except.c,v 1.9 2004/12/22 00:54:39 david Exp $ */ +/* $OpenBSD: except.c,v 1.10 2006/05/15 14:00:22 kettenis Exp $ */ #include #include @@ -97,5 +97,11 @@ main(int argc, char *argv[]) errx(1, "unrecognized condition %s", argv[1]); } + /* + * attempt to trigger the exception on machines where + * floating-point exceptions are deferred. + */ + x = one * one; + errx(1, "signal wasn't caught"); } -- cgit v1.2.3