2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
Reza Yazdani <reza.yazdani@amd.com>
PR middle-end/43065
* graphite-sese-to-poly.c (add_param_constraints): Insert bounds
on pointer type parameters.
* gcc.dg/graphite/run-id-4.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157289
138bc75d-0d04-0410-961f-
82ee72b054a4
-2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
+2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
+ Reza Yazdani <reza.yazdani@amd.com>
+
+ PR middle-end/43065
+ * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
+ on pointer type parameters.
+
+ * gcc.dg/graphite/run-id-4.c: New.
+
+2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
PR middle-end/43065
* gcc.dg/graphite/run-id-3.c: New.
ppl_Linear_Expression_t le;
tree parameter = VEC_index (tree, SESE_PARAMS (SCOP_REGION (scop)), p);
tree type = TREE_TYPE (parameter);
- tree lb, ub;
+ tree lb = NULL_TREE;
+ tree ub = NULL_TREE;
- if (!INTEGRAL_TYPE_P (type))
- return;
-
- lb = TYPE_MIN_VALUE (type);
- ub = TYPE_MAX_VALUE (type);
+ if (INTEGRAL_TYPE_P (type))
+ {
+ lb = TYPE_MIN_VALUE (type);
+ ub = TYPE_MAX_VALUE (type);
+ }
+ else if (POINTER_TYPE_P (type))
+ {
+ lb = TYPE_MIN_VALUE (unsigned_type_node);
+ ub = TYPE_MAX_VALUE (unsigned_type_node);
+ }
if (lb)
{
--- /dev/null
+/* PR rtl-optimization/24899 */
+
+extern void abort (void);
+
+__attribute__ ((noinline)) int
+foo (int x, int y, int *z)
+{
+ int a, b, c, d;
+
+ a = b = 0;
+ for (d = 0; d < y; d++)
+ {
+ if (z)
+ b = d * *z;
+ for (c = 0; c < x; c++)
+ a += b;
+ }
+
+ return a;
+}
+
+int
+main (void)
+{
+ if (foo (3, 2, 0) != 0)
+ abort ();
+ return 0;
+}