This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Your change to build_method_call breaks g++
- To: jason at cygnus dot com
- Subject: Your change to build_method_call breaks g++
- From: hjl at lucon dot org (H.J. Lu)
- Date: Wed, 10 Jun 1998 10:14:18 -0700 (PDT)
- Cc: egcs-bugs at cygnus dot com
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.