------- Comment #4 from matz at gcc dot gnu dot org  2009-09-09 15:41 -------
Even shorter:
struct ErrmsgWindow
{
    virtual ~ErrmsgWindow()
    {
      extern int _switch_mode_errorstr;
      _switch_mode_errorstr = 42;
    }
};
void ShowErrorMessage(void)
{
  ErrmsgWindow w;
}

The problem appears with r151360, which is the merge of free_lang_data.

A quick glance reveals that the problem is that somehow the inlining of
__deleting_dtor into __comp_dtor doesn't correctly adjust the DECL_CONTEXT
of the _switch_mode_errorstr decl.

As this can't be reproduced with a similar setup just involving normal
functions (not dtors) I would assume that the special handling of clones
and how they are produced from each other is broken.


-- 

matz at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dnovillo at gcc dot gnu dot
                   |                            |org


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

Reply via email to