Hi,
while playing with ClooG I came across a small bug that generates
non-compilable code by re-declaring scattering iterators in some
situations. A patch is attached down below.
Best regards
Daniel
Signed-off-by: Daniel Maier <
daniel...@tu-berlin.de>
---
source/program.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source/program.c b/source/program.c
index 77f8f37..f3d4dd9 100644
--- a/source/program.c
+++ b/source/program.c
@@ -317,8 +317,8 @@ static void print_scattering_declarations(FILE *file, CloogProgram *program,
// iterator names.
char **scatnames = (char **) malloc(sizeof(char *) * names->nb_scattering);
for (i = 0; i < names->nb_scattering; ++i) {
+ found = 0;
for (j = 0; j < names->nb_iterators; ++j) {
- found = 0;
if (strcmp(names->scattering[i], names->iterators[j]) == 0) {
found = 1;
}
--
2.17.1