This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix devirt2.C testcase


> 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" } } */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]