------- Comment #2 from drow at gcc dot gnu dot org  2010-04-04 15:45 -------
FYI, this patch also fixes a number of failures in cpexprs.exp in GDB. 
Testcase:

struct s
{
  bool operator!= (s const& o) const { return false; }
};

bool
func (const struct s& arg, const struct s& right)
{
  return arg != right;
}

The THIS argument of operator!= gets a valid type.  The O argument gets the
self-typedef, and produces a DW_TAG_const_type with no type argument.

I'd say an assertion in modified_type_die after creating a new const or
volatile DIE with sub_die == NULL would be appropriate, if it weren't for the
ERROR_MARK handling... I don't know if we get here after errors.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43628

Reply via email to