This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix type mismatch in tree-ssa-alias.c
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: Diego Novillo <dnovillo at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, "Mitchell, Mark" <mark at codesourcery dot com>
- Date: Fri, 13 Jan 2006 13:18:32 -0500
- Subject: Re: Fix type mismatch in tree-ssa-alias.c
- References: <200601131302.35389.dnovillo@redhat.com>
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;