public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hubicka at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/58252] [4.9 Regression] ice in gimple_get_virt_method_for_binfo with -O2
Date: Thu, 05 Sep 2013 17:25:00 -0000	[thread overview]
Message-ID: <bug-58252-4-pAa0bKuMIs@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-58252-4@http.gcc.gnu.org/bugzilla/>

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

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |hubicka at gcc dot gnu.org

--- Comment #4 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Jason,
I think I need your help here.  There is OBJ_TYPE_REF calling method of class
_impl_Container with token 3.  
We walk possible targets and while walking StructDef, we find BINFO matghing
_impl_Container and walk its vtable for method at token 3. The vtable however
does not contain 3 methods at all.

I added code to pretty-print to also print obj_type_ref_class_type and I get:
  <bb 2>:
  tcd = cd;
  D.3158 = svnt->_vptr.omniServant;
  D.3159 = D.3158 + 16;
  D.3160 = *D.3159;
  _PD_repoId.0 = _PD_repoId;
  D.3170 = OBJ_TYPE_REF(D.3160;(struct omniServant)svnt->2) (svnt,
_PD_repoId.0);
  impl = D.3170;
  D.3162 = impl->D.2424.D.2333._vptr.omniServant;
  D.3163 = D.3162 + 24;
  D.3164 = *D.3163;
  D.3165 = tcd->arg_3;
  D.3166 = tcd->arg_2;
  D.3167 = tcd->arg_1;
  D.3168 = tcd->arg_0;
  D.3171 = OBJ_TYPE_REF(D.3164;(struct _impl_Container)impl->3) (impl, D.3168,
D.3167, D.3166, D.3165);

So I think the problem i sthat the code really looks into vtable of
omniServant, but OBJ_TYPE_REF is interepretted as _impl_Container.
I take the class type from the THIS pointer type of the method_type of the
call.  Is it posisble for omniServant vtable to contains method accepting
different types?

In that case we will need different implementation of obj_type_ref_class_type?


  parent reply	other threads:[~2013-09-05 17:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-27 15:11 [Bug c++/58252] New: " dcb314 at hotmail dot com
2013-08-27 15:20 ` [Bug c++/58252] " paolo.carlini at oracle dot com
2013-08-29 11:36 ` jamborm at gcc dot gnu.org
2013-08-29 15:37 ` jamborm at gcc dot gnu.org
2013-09-03 19:56 ` [Bug c++/58252] [4.9 Regression] " paolo.carlini at oracle dot com
2013-09-05 17:25 ` hubicka at gcc dot gnu.org [this message]
2013-09-06 11:27 ` rguenth at gcc dot gnu.org
2013-09-09  9:02 ` hubicka at gcc dot gnu.org
2013-10-30 13:32 ` rguenth at gcc dot gnu.org
2013-12-17  9:42 ` trippels at gcc dot gnu.org
2013-12-24 13:53 ` trippels at gcc dot gnu.org
2014-01-02  9:29 ` dcb314 at hotmail dot com
2014-01-06 15:58 ` hubicka at gcc dot gnu.org
2014-01-07  9:34 ` hubicka at gcc dot gnu.org
2014-01-10  9:34 ` hubicka at gcc dot gnu.org
2014-01-10  9:34 ` hubicka at gcc dot gnu.org
2014-01-10  9:36 ` hubicka at gcc dot gnu.org
2014-01-11 11:01 ` hubicka at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-58252-4-pAa0bKuMIs@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).