Solve the missed local dimension bug with strides and modulo guardsmaster
commit70e234a28f0f7486f3b5a5eb3d3e0a8434a3e592
authorCedric Bastoul <cedric.bastoul@unistra.fr>
Tue, 28 Jul 2015 23:43:27 +0000 (29 01:43 +0200)
committerCedric Bastoul <cedric.bastoul@unistra.fr>
Tue, 28 Jul 2015 23:48:23 +0000 (29 01:48 +0200)
treee828c827c78474ac056ced87f1b0e50b918bbeaa
parent9b73b289d303f3bf61e787790b26e94e74458d1d
Solve the missed local dimension bug with strides and modulo guards

The problem came from an inconsistency between "for" and "if" when
creating a new local dimension: "for" incremented the loop depth
before creating a new local dimension while "if" incremented the
if depth after creating the new local dimension. Since after a
loop or if body, the number of local dimension at this depth was
zero'ed, the inconsistency could, e.g., make a "if" to remove some
"for" local dimensions.

This patch makes the ordering coherent: "for" now may create local
dimensions before incrementing the loop depths. This solution was
chosen because of the limited change to the code.
source/parser.y
tests/Makefile.am
tests/unitary/stride_ifmod.c [new file with mode: 0644]
tests/unitary/stride_ifmod.c.scop [new file with mode: 0644]