From 9629052501145f499552d14f2d032137518ee293 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Fri, 2 May 2014 16:34:02 +0200 Subject: [PATCH] fix quasi_affine test case In particular, avoid out-of-bounds access. Signed-off-by: Sven Verdoolaege --- tests/quasi_affine.c | 2 +- tests/quasi_affine.scop | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/quasi_affine.c b/tests/quasi_affine.c index 70612de..9a50a75 100644 --- a/tests/quasi_affine.c +++ b/tests/quasi_affine.c @@ -6,7 +6,7 @@ void foo() { int i; int in; - int A[N]; + int A[N + 1]; int out; #pragma scop diff --git a/tests/quasi_affine.scop b/tests/quasi_affine.scop index bf12bac..d52f59c 100644 --- a/tests/quasi_affine.scop +++ b/tests/quasi_affine.scop @@ -1,11 +1,11 @@ -start: 84 -end: 218 +start: 88 +end: 222 indent: "\t" -context: '[N, in] -> { : N <= 2147483647 and N >= 0 and in <= 2147483647 and in >= - -2147483648 }' +context: '[N, in] -> { : N <= 2147483646 and N >= -1 and in <= 2147483647 and in + >= -2147483648 }' arrays: -- context: '[N] -> { : N >= 0 }' - extent: '[N, in] -> { A[i0] : i0 <= -1 + N and i0 >= 0 }' +- context: '[N] -> { : N <= 2147483646 and N >= -1 }' + extent: '[N, in] -> { A[i0] : i0 <= N and i0 >= 0 }' element_type: int element_size: 4 - context: '{ : }' @@ -14,7 +14,7 @@ arrays: element_size: 4 statements: - line: 14 - domain: '[N, in] -> { S_0[] }' + domain: '[N, in] -> { S_0[] : N >= 0 }' schedule: '[N] -> { S_0[] -> [0, 0] }' body: type: expression @@ -58,7 +58,7 @@ statements: read: 1 write: 0 - line: 18 - domain: '[N, in] -> { S_2[] }' + domain: '[N, in] -> { S_2[] : N >= 0 }' schedule: '[N] -> { S_2[] -> [0, 2] }' body: type: expression -- 2.11.4.GIT