isl_printer_print_pw_aff: keep track of whether we have printed any constraint
commit0f03382151c2d3bb4235c747f259bcdcf499f4ca
authorSven Verdoolaege <skimo@kotnet.org>
Mon, 26 May 2014 14:27:08 +0000 (26 16:27 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sat, 14 Jun 2014 09:57:23 +0000 (14 11:57 +0200)
tree5a40871bae0a73ea2f26f118ee53fc7ff3dc0eb7
parent70f7bcfa487a52f2571a0f1a33917655eb7b5899
isl_printer_print_pw_aff: keep track of whether we have printed any constraint

In the original code, it was the responsibility of print_basic_set_c to
keep track of whether it has printed any constraints with print_constraint_c
(or otherwise).
However, in d593762 (isl_printer_print_pw_aff: skip constraints implied
by div expression, Tue Feb 7 12:17:03 2012 +0100), we started skipping
some constraints in print_constraint_c.  If this happened to be the
first constraint that we tried to print, then print_basic_set_c's notion
of whether we have printed anything yet would be wrong, resulting in
output that starts with "&&".
Keep track of whether we have printed any constraint in print_constraint_c
itself.

It is difficult to construct a simple test case that reliably tickles
this bug.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_output.c