From 1f13c75a66fc7431d81baf240180d6ae6319f20a Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Fri, 9 Nov 2012 14:38:41 -0500 Subject: [PATCH] regressions/ck_pr_store: Add coverage for double. It appears GCC doesn't handle IMM constraint gracefully for double. This isn't an issue with clang. --- regressions/ck_pr/validate/ck_pr_store.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/regressions/ck_pr/validate/ck_pr_store.c b/regressions/ck_pr/validate/ck_pr_store.c index a76eb3b..de886d7 100644 --- a/regressions/ck_pr/validate/ck_pr_store.c +++ b/regressions/ck_pr/validate/ck_pr_store.c @@ -32,6 +32,7 @@ #include #include +#include "../../common.h" #ifndef R_REPEAT #define R_REPEAT 200000 @@ -117,9 +118,15 @@ rg_width(int m) int main(void) { + double d; srandom((unsigned int)getpid()); + ck_pr_store_double(&d, 0.0); + if (ck_pr_load_double(&d) != 0.0) { + ck_error("Stored 0 in double, did not find 0.\n"); + } + #ifdef CK_F_PR_STORE_64 CK_PR_STORE_B(64); #endif