This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
tree-ssa-dom.c Bug or not?
- From: Marcin Dalecki <martin at dalecki dot de>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 31 Jan 2005 09:46:08 +0100
- Subject: tree-ssa-dom.c Bug or not?
Just looking at the file mentioned in the subject I have found the
following suspicious code around line 1380:
static void
record_cond (tree cond, tree value)
{
...
slot = htab_find_slot_with_hash (avail_exprs, (void *)element,
element->hash, true);
...
}
A one is passed in the form of true as the last argument to the
above function. However this arguments seems to be of enum inert_option
type.
Checking the possible values of insert_option shows that the values
used there should read INSERT instead.
Thus we should have:
slot = htab_find_slot_with_hash (avail_exprs, (void *)element,
element->hash, INSERT);
Instead there.
PS. I didn't prepare a patch, since applying such a patch would be more
difficult then just looking the code in question up and changing it
directly
for someone with commit permissions anyway.