Off by one use of abort() instead of gcc_assert()
Christophe Jaillet
christophe.jaillet@wanadoo.fr
Sat Dec 3 10:20:00 GMT 2005
Not really a patch, because I'm currently not able to bootstrap gcc :-(, but
anyway :
In file "ipa-type-escape.c", in function "analyze_variable", there is one of
the last construction of type : if () abort() as stated in the wiki page
"partial transitions"
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
if (TREE_CODE (global) == VAR_DECL)
{
if (DECL_INITIAL (global))
walk_tree (&DECL_INITIAL (global), scan_for_refs,
NULL, visited_nodes);
}
else abort();
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
that could certainly be turned into :
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
gcc_assert(TREE_CODE (global) != VAR_DECL);
if (DECL_INITIAL (global))
walk_tree (&DECL_INITIAL (global), scan_for_refs,
NULL, visited_nodes);
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
CJ
More information about the Gcc-patches
mailing list