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: Patch for PR39557


On Thu, Mar 26, 2009 at 01:01:33AM -0700, Xinliang David Li wrote:
> See the attached.
> 
> David
> 
> On Wed, Mar 25, 2009 at 11:30 PM, Paolo Bonzini <bonzini@gnu.org> wrote:
> >> Index: testsuite/g++.dg/tree-ssa/dom-invalid.C
> >
> > Same concern for the test size.  Otherwise seems ok to me, even though I
> > cannot approve it.

The testcase is still far from being minimal, there are obvious things that
can be removed without changing anything.

Also, -fprofile-use=/blah is IMHO a very bad idea, what if /blah contains
devices or something?  -fprofile-use alone works just as well.
Here is a more reduced testcase.
As for the other PR, so far I've only done delta on it with no manual tweaks
(which often enable delta to do far more and then in the end you just do a
few extra manual tweaks) and got it to 109121 bytes, but stopped when you
said you have already a smaller testcase.

// PR tree-optimization/39557
// invalid post-dom info leads to infinite loop
// { dg-do run }
// { dg-options "-fno-exceptions -O2 -fprofile-use -fno-rtti" }

struct C
{
  virtual const char *bar () const;
};

struct D
{
  D () : d1 (0) { }
  C *d2[4];
  int d1;
  inline const C & baz (int i) const { return *d2[i]; }
};

struct E
{
  unsigned char e1[2];
  D e2;
  bool foo () const { return (e1[1] & 1) != 0; }
  virtual const char *bar () const __attribute__ ((noinline));
};

const char *
C::bar () const
{
  return 0;
}

C c;

const char *
E::bar () const
{
  const char *e = __null;
  if (foo () && (e = c.C::bar ()))
    return e;
  for (int i = 0, n = e2.d1; i < n; i++)
    if ((e = e2.baz (i).C::bar ()))
      return e;
  return e;
}

int
main ()
{
  E e;
  e.bar ();
} // { dg-message  "note: file" "" }


	Jakub


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