This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix devirt2.C testcase
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 17 Dec 2013 15:56:45 +0100
- Subject: Re: Fix devirt2.C testcase
- Authentication-results: sourceware.org; auth=none
- References: <20131217110458 dot GB3174 at kam dot mff dot cuni dot cz> <CAMe9rOqTnXvSJNRVCD_8eqokLb5v9kGfA4OknuMOv-rPcuEHSQ at mail dot gmail dot com>
> On Tue, Dec 17, 2013 at 3:04 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
> > Hi,
> > I forgot the following change in my tree. It fixes type consistency sanity
> > check in get_polymorphic_call_info. With the change to gimple-fold it is
> > now needed to devrirtualize devirt2.C. (previously the bug went latent since
> > the old code handled the testcase)
> >
> > I am re-testing x86_64-linux and will commit it shortly. I apologize for
> > breaking the testcase.
> >
> > Honza
> >
> > * ipa-devirt.c (get_polymorphic_call_info): Fix offset when
> > checking type consistency; do not set bogus outer_type
> > when check fails.
> >
>
> Does it fix:
>
> FAIL: g++.dg/ipa/devirt-13.C -std=gnu++11 scan-ipa-dump cgraph
> "Devirtualizing call"
> FAIL: g++.dg/ipa/devirt-13.C -std=gnu++98 scan-ipa-dump cgraph
> "Devirtualizing call"
>
> on Linux/x86?
This one needs update, since it is foled a lot earlier than before.
I made the change, but it seems I did not include it at commit line
and subsequently reverted. Here is a patch I will commit shortly.
Index: g++.dg/ipa/devirt-13.C
===================================================================
--- g++.dg/ipa/devirt-13.C (revision 206040)
+++ g++.dg/ipa/devirt-13.C (working copy)
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* Call to foo should be devirtualized because there are no derived types of A. */
-/* { dg-options "-O2 -fdump-ipa-cgraph -fdump-tree-ssa" } */
+/* { dg-options "-O2 -fdump-tree-ssa" } */
namespace {
class A {
public:
@@ -16,7 +16,5 @@ main()
return b->foo();
}
-/* { dg-final { scan-ipa-dump "Devirtualizing call" "cgraph" } } */
/* { dg-final { scan-tree-dump-times "OBJ_TYPE_REF" 0 "ssa"} } */
-/* { dg-final { cleanup-ipa-dump "cgraph" } } */
/* { dg-final { cleanup-tree-dump "ssa" } } */