> Did you try your code with 64bit pointer types?

Yes. It seems that the result is the same.

> In any case, I don't think it is worth spending time on this. I would check
> in the scop detection that we disable the handling of unsigned and pointer
> types. It is a complex thing to model and the approach currently taking of
> always model their wrapping behaviour seems wrong.

I’ve attached a patch, which disables the handling SSA_NAME nodes in
case they are pointers to object types. Which nodes should also be
disabled? (I’ve found that this disabling helps to avoid the error and
can be a temporary solution) Is the graphite_can_represent_scev an
appropriate place for the disabling of type handling?

-- 
                                    Cheers, Roman Gareev.
Index: gcc/graphite-scop-detection.c
===================================================================
--- gcc/graphite-scop-detection.c       (revision 213773)
+++ gcc/graphite-scop-detection.c       (working copy)
@@ -54,6 +54,7 @@
 #include "tree-pass.h"
 #include "sese.h"
 #include "tree-ssa-propagate.h"
+#include "cp/cp-tree.h"
 
 #ifdef HAVE_cloog
 #include "graphite-poly.h"
@@ -217,6 +218,9 @@
   if (chrec_contains_undetermined (scev))
     return false;
 
+  if (TYPE_PTROB_P (TREE_TYPE (scev)) && TREE_CODE (scev) == SSA_NAME)
+    return false;
+
   switch (TREE_CODE (scev))
     {
     case NEGATE_EXPR:

Reply via email to