Sven Verdoolaege
unread,Sep 29, 2012, 7:35:37 AM9/29/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cloog-de...@googlegroups.com, Cédric Bastoul, Tobias Grosser, Albert Cohen
FYI,
CLooG seems to assume that the '%' operator in C always
returns a non-negative number, whereas in fact it returns
a number of the same sign as the first argument.
The attached input illustrates the problem.
$ ./cloog /tmp/mod.cloog
/* Generated from /tmp/mod.cloog by CLooG 0.17.0-14-g633a9e1 gmp bits in 0.00s. */
for (i=-100;i<=100;i++) {
if (i%5 <= 1) {
S1(i);
}
}
$ ./cloog -compilable 1 /tmp/mod.cloog > /tmp/mod.c
$ gcc -o /tmp/mod /tmp/mod.c
$ /tmp/mod | tail
S1 80
S1 81
S1 85
S1 86
S1 90
S1 91
S1 95
S1 96
S1 100
Number of integral points: 141.
In fact the input only contains 81 points:
$ ./iscc
card
4 4 1 0 1 0
1 1 0 100
1 -1 0 100
1 1 -5 0
1 -1 5 1
;
$0 := { 81 }
(It's not entirely impossible that I may have been the one to introduce
this problem.)
skimo