This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix type mismatch in tree-ssa-alias.c


On Fri, 2006-01-13 at 13:02 -0500, Diego Novillo wrote:
> Michael Walsh pointed out this type mismatch in tree-ssa-alias.c.  In 
> add_type_alias (4.1 branch), we have:
> 
>          gcc_assert (var_ann (var)->type_mem_tag == NOT_A_TAG);
> 
> The field type_mem_tag is a tree.  By chance, NOT_A_TAG is 0, so we end up 
> checking what we intended.
Yes, i noticed this on IAB, and forgot to mention it to you.

I hit it when i changed the trees to a different types.

I had:

@@ -2307,7 +2538,7 @@ add_type_alias (tree ptr, tree var)
 found_tag:
   /* If VAR is not already PTR's type tag, add it to the may-alias set
      for PTR's type tag.  */
-  gcc_assert (!MTAG_P (var_ann (var)->type_mem_tag));
+  gcc_assert (var_ann (var)->type_mem_tag == NULL);
   tag = ann->type_mem_tag;






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]