OSDN Git Service

* tree.c (build_range_type_1): Do not set TYPE_STRUCTURAL_EQUALITY_P
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 30 Nov 2010 14:24:11 +0000 (14:24 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 30 Nov 2010 14:24:11 +0000 (14:24 +0000)
because of self-referential bounds.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167297 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree.c

index a6099b8..0a325ce 100644 (file)
@@ -1,3 +1,8 @@
+2010-11-30  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * tree.c (build_range_type_1): Do not set TYPE_STRUCTURAL_EQUALITY_P
+       because of self-referential bounds.
+
 2010-11-30  Joseph Myers  <joseph@codesourcery.com>
 
        * diagnostic-core.h: Include bversion.h.
index 2f8d96e..d9a98f1 100644 (file)
@@ -7110,9 +7110,11 @@ build_range_type_1 (tree type, tree lowval, tree highval, bool shared)
   TYPE_USER_ALIGN (itype) = TYPE_USER_ALIGN (type);
 
   if ((TYPE_MIN_VALUE (itype)
-       && TREE_CODE (TYPE_MIN_VALUE (itype)) != INTEGER_CST)
+       && TREE_CODE (TYPE_MIN_VALUE (itype)) != INTEGER_CST
+       && !CONTAINS_PLACEHOLDER_P (TYPE_MIN_VALUE (itype)))
       || (TYPE_MAX_VALUE (itype)
-         && TREE_CODE (TYPE_MAX_VALUE (itype)) != INTEGER_CST))
+         && TREE_CODE (TYPE_MAX_VALUE (itype)) != INTEGER_CST
+         && !CONTAINS_PLACEHOLDER_P (TYPE_MAX_VALUE (itype))))
     {
       /* Since we cannot reliably merge this type, we need to compare it using
         structural equality checks.  */