Pointers eventually need intermediate conversions in code generation.
Allowing them is much easier than fending them off since niter
and scev expansion easily drag those in.
2020-02-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/93964
* graphite-isl-ast-to-gimple.c
(gcc_expression_from_isl_ast_expr_id): Add intermediate
conversion for pointer to integer converts.
* graphite-scop-detection.c (assign_parameter_index_in_region):
Relax assert.
* gcc.dg/graphite/pr93964.c: New testcase.
+2020-02-04 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/93964
+ * graphite-isl-ast-to-gimple.c
+ (gcc_expression_from_isl_ast_expr_id): Add intermediate
+ conversion for pointer to integer converts.
+ * graphite-scop-detection.c (assign_parameter_index_in_region):
+ Relax assert.
+
2020-03-04 Martin Liska <mliska@suse.cz>
PR c/93886
tree t = res->second;
if (useless_type_conversion_p (type, TREE_TYPE (t)))
return t;
+ if (POINTER_TYPE_P (TREE_TYPE (t))
+ && !POINTER_TYPE_P (type) && !ptrofftype_p (type))
+ t = fold_convert (sizetype, t);
return fold_convert (type, t);
}
assign_parameter_index_in_region (tree name, sese_info_p region)
{
gcc_assert (TREE_CODE (name) == SSA_NAME
- && INTEGRAL_TYPE_P (TREE_TYPE (name))
&& ! defined_in_sese_p (name, region->region));
int i;
tree p;
+2020-02-04 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/93964
+ * gcc.dg/graphite/pr93964.c: New testcase.
+
2020-03-04 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/94001
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O -floop-nest-optimize" } */
+
+int *
+eo (void);
+
+void
+g4 (int *nt)
+{
+ int dh, t2 = (__INTPTR_TYPE__)eo ();
+
+ for (dh = 0; dh < 2; ++dh)
+ {
+ int m7;
+
+ for (m7 = 0; m7 < t2; ++m7)
+ nt[m7] = 0;
+ }
+}