Your change to build_method_call breaks g++
H.J. Lu
hjl@lucon.org
Wed Jun 10 13:00:00 GMT 1998
Hi,
Your change to build_method_call in call.c left TMP around line 649
uninitialized in some cases:
if (TREE_CODE (name) == BIT_NOT_EXPR)
{
tree tmp;
flags |= LOOKUP_DESTRUCTOR;
name = TREE_OPERAND (name, 0);
if (parms)
error ("destructors take no parameters");
basetype = TREE_TYPE (instance);
if (TREE_CODE (basetype) == REFERENCE_TYPE)
basetype = TREE_TYPE (basetype);
if (TREE_CODE (name) == TYPE_DECL)
tmp = TREE_TYPE (name);
else if (TREE_CODE_CLASS (TREE_CODE (name)) == 't')
tmp = name;
else if (TREE_CODE (name) == IDENTIFIER_NODE)
{
if (IS_AGGR_TYPE (basetype) && tmp == constructor_name (basetype))
tmp = basetype;
else
tmp = get_type_value (tmp);
}
else
my_friendly_abort (980605);
As you can see, tmp has some random value in
if (IS_AGGR_TYPE (basetype) && tmp == constructor_name (basetype))
H.J.
More information about the Gcc-bugs
mailing list