tree-dfa.c (mark_new_vars_to_rename): Protect against calling with a PHI_NODE argument.
authorRichard Guenther <rguenther@suse.de>
Mon, 25 Jul 2005 14:01:02 +0000 (14:01 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 25 Jul 2005 14:01:02 +0000 (14:01 +0000)
2005-07-25  Richard Guenther  <rguenther@suse.de>

* tree-dfa.c (mark_new_vars_to_rename): Protect against
calling with a PHI_NODE argument.

* tree-flow-inline.h (overlap_subvar): Protect against
possible overflow.

From-SVN: r102358

gcc/ChangeLog
gcc/tree-dfa.c
gcc/tree-flow-inline.h

index bd3dcdf..530a11d 100644 (file)
@@ -1,3 +1,11 @@
+2005-07-25  Richard Guenther  <rguenther@suse.de>
+
+       * tree-dfa.c (mark_new_vars_to_rename): Protect against
+       calling with a PHI_NODE argument.
+
+       * tree-flow-inline.h (overlap_subvar): Protect against
+       possible overflow.
+
 2005-07-25  Paolo Bonzini  <bonzini@gnu.org>
 
        * aclocal.m4 (gcc_AC_CHECK_TOOL): Add /bin to default directory.
index b9fecfb..beb83fb 100644 (file)
@@ -708,6 +708,9 @@ mark_new_vars_to_rename (tree stmt)
   int v_may_defs_before, v_may_defs_after;
   int v_must_defs_before, v_must_defs_after;
 
+  if (TREE_CODE (stmt) == PHI_NODE)
+    return;
+
   vars_in_vops_to_rename = BITMAP_ALLOC (NULL);
 
   /* Before re-scanning the statement for operands, mark the existing
index 30d13ab..7bcfefd 100644 (file)
@@ -1518,7 +1518,7 @@ overlap_subvar (unsigned HOST_WIDE_INT offset, unsigned HOST_WIDE_INT size,
     {
       return true;
     }
-  else if (offset < sv->offset && (offset + size > sv->offset))
+  else if (offset < sv->offset && (size > sv->offset - offset))
     {
       return true;
     }