public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Fabien Chêne" <fabien.chene@gmail.com>
To: Jason Merrill <jason@redhat.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [C++ Patch] for c++/11750
Date: Tue, 06 Nov 2012 19:59:00 -0000	[thread overview]
Message-ID: <CAFH4-dg1i3_FdFSd7XvzTZpCruHCE3Hg6hoHOvELU0mV6bbjyA@mail.gmail.com> (raw)
In-Reply-To: <CAFH4-dgWPsHHreURcEkL0NyzeKBVvxz4Xmt_y6x-mfnXTdvRyQ@mail.gmail.com>

Jason, could you please have a look at this (rather old) one ?
Thanks.

2012/8/13 Fabien Chêne <fabien.chene@gmail.com>:
> Hi,
>
> Here, we were setting the LOOKUP_NONVIRTUAL flag wrongly. Actually, we
> need to check if the function context is the same than the instance
> type -- yes that might happen that they be different in presence of
> using-declarations.
>
> It happens that it was working if the call was invoked through a
> pointer, that's because  we were failing to determine the dynamic type
> (in resolved_fixed_type_p). On the contrary, it wasn't working if the
> call was done through a reference because we manage to determine the
> dynamic_type thanks to a special case in fixed_type_or_null. There is
> probably room for improvement here, though I'm not sure the C++ front
> end is the better place to de-virtualize.
>
> Tested x84_64-unknown-linux-gnu without regressions. OK to commit ?
>
> gcc/testsuite/ChangeLog
>
> 2012-08-12  Fabien Chêne  <fabien@gcc.gnu.org>
>
>         PR c++/11750
>         * g++.dg/inherit/vitual9.C: New.
>
> gcc/cp/ChangeLog
>
> 2012-08-12  Fabien Chêne  <fabien@gcc.gnu.org>
>
>         PR c++/11750
>         * call.c (build_new_method_call_1): Check that the instance type
>         and the function context are the same before setting the flag
>         LOOKUP_NONVIRTUAL.
>
>
> --
> Fabien

-- 
Fabien

  reply	other threads:[~2012-11-06 19:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-13 20:49 Fabien Chêne
2012-11-06 19:59 ` Fabien Chêne [this message]
2012-11-08 22:16 ` Jason Merrill

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=CAFH4-dg1i3_FdFSd7XvzTZpCruHCE3Hg6hoHOvELU0mV6bbjyA@mail.gmail.com \
    --to=fabien.chene@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    /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).