summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2003-06-12 03:16:00 +0200
committerKevin Ryde <user42@zip.com.au>2003-06-12 03:16:00 +0200
commit365d136b627a282698c88bb560550ed1a712817e (patch)
treee0112c5a87b26f104788a0be8d049cd33d31fbe7 /tests
parent139f035785a533360119ec3d4e3fb0013c916dcc (diff)
downloadgmp-365d136b627a282698c88bb560550ed1a712817e.tar.gz
* tests/devel/try.c (try_one): When overlapping, copy source data
after filling dst. Previously probably used only DEADVAL in overlapping cases.
Diffstat (limited to 'tests')
-rw-r--r--tests/devel/try.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/tests/devel/try.c b/tests/devel/try.c
index 24ee622b6..498170390 100644
--- a/tests/devel/try.c
+++ b/tests/devel/try.c
@@ -2406,12 +2406,6 @@ try_one (void)
}
mprotect_region (&s[i].region, PROT_READ);
-
- if (ref.s[i].p != s[i].p)
- {
- refmpn_copyi (ref.s[i].p, s[i].p, SRC_SIZE(i));
- refmpn_copyi (fun.s[i].p, s[i].p, SRC_SIZE(i));
- }
}
for (i = 0; i < NUM_DESTS; i++)
@@ -2440,6 +2434,18 @@ try_one (void)
}
}
+ for (i = 0; i < NUM_SOURCES; i++)
+ {
+ if (! tr->src[i])
+ continue;
+
+ if (ref.s[i].p != s[i].p)
+ {
+ refmpn_copyi (ref.s[i].p, s[i].p, SRC_SIZE(i));
+ refmpn_copyi (fun.s[i].p, s[i].p, SRC_SIZE(i));
+ }
+ }
+
if (option_print)
print_all();