+2014-04-14 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/55022
+ * fold-const.c (negate_expr_p): Don't negate directional rounding
+ division.
+ (fold_negate_expr): Likewise.
+
2014-04-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/59817
case TRUNC_DIV_EXPR:
case ROUND_DIV_EXPR:
- case FLOOR_DIV_EXPR:
- case CEIL_DIV_EXPR:
case EXACT_DIV_EXPR:
/* In general we can't negate A / B, because if A is INT_MIN and
B is 1, we may turn this into INT_MIN / -1 which is undefined
case TRUNC_DIV_EXPR:
case ROUND_DIV_EXPR:
- case FLOOR_DIV_EXPR:
- case CEIL_DIV_EXPR:
case EXACT_DIV_EXPR:
/* In general we can't negate A / B, because if A is INT_MIN and
B is 1, we may turn this into INT_MIN / -1 which is undefined
+2014-04-14 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/55022
+ * gcc.dg/graphite/pr55022.c: New testcase.
+
2014-04-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/59817
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 -fgraphite-identity" } */
+
+extern void abort (void);
+
+void __attribute__((noinline,noclone))
+f(int *limit, int minLen, int maxLen)
+{
+ int i;
+
+ for (i = minLen; i <= maxLen; i++) {
+ limit[i] = i;
+ }
+}
+
+int main()
+{
+ int limit[256], i;
+ f (limit, 0, 255);
+ for (i = 0; i < 256; ++i)
+ {
+ if (limit[i] != i)
+ abort ();
+ __asm__ volatile ("" : : : "memory");
+ }
+ return 0;
+}