summaryrefslogtreecommitdiff
path: root/test/example/relooper-fuzz.c
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-05-07 19:51:36 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-05-07 19:51:36 -0700
commit9c9fb503a8a5ffce9eae4b48cce4b06d41146fc1 (patch)
treea5379614c796ee5bfacf118c11b57e312175159b /test/example/relooper-fuzz.c
parentb0f8df05f1d4f751629296f48675b46a017f7925 (diff)
downloadbinaryen-9c9fb503a8a5ffce9eae4b48cce4b06d41146fc1.tar.gz
binaryen-9c9fb503a8a5ffce9eae4b48cce4b06d41146fc1.tar.bz2
binaryen-9c9fb503a8a5ffce9eae4b48cce4b06d41146fc1.zip
fix relooper fuzz testcase to be valid old-style c (#459)
Diffstat (limited to 'test/example/relooper-fuzz.c')
-rw-r--r--test/example/relooper-fuzz.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/test/example/relooper-fuzz.c b/test/example/relooper-fuzz.c
index ba9bcb3ed..cfd10a9b3 100644
--- a/test/example/relooper-fuzz.c
+++ b/test/example/relooper-fuzz.c
@@ -229,12 +229,15 @@ int main() {
BinaryenExpressionRef full[numDecisions + 1]; // write out all the decisions, then the body of the function
- for (int i = 0; i < numDecisions; i++) {
- full[i] = BinaryenStore(module,
- 4, 0, 0,
- BinaryenConst(module, BinaryenLiteralInt32(8 + 4 * i)),
- BinaryenConst(module, BinaryenLiteralInt32(decisions[i]))
- );
+ {
+ int i;
+ for (i = 0; i < numDecisions; i++) {
+ full[i] = BinaryenStore(module,
+ 4, 0, 0,
+ BinaryenConst(module, BinaryenLiteralInt32(8 + 4 * i)),
+ BinaryenConst(module, BinaryenLiteralInt32(decisions[i]))
+ );
+ }
}
full[numDecisions] = body;
BinaryenExpressionRef all = BinaryenBlock(module, NULL, full, numDecisions + 1);