tree-ssa-dom.c Bug or not?

Marcin Dalecki martin@dalecki.de
Mon Jan 31 09:54:00 GMT 2005


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.



More information about the Gcc mailing list