This is the mail archive of the gcc-bugs@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]

[Bug ipa/60973] Invalid propagation of a tail call in devirt pass


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

--- Comment #3 from UroÅ Bizjak <ubizjak at gmail dot com> ---
(In reply to Richard Biener from comment #1)

> Index: gcc/tree-inline.c

I have checked this patch on my target, where it fixes the runtime problem. The
optimized tree dump results in:

int main(int, char**) (int argc, char * * argv)
{
  int retval.0;
  struct C c;
  int _3;

  <bb 2>:
  C::C (&c);
  _3 = get_input ();
  retval.0_8 = C::foo (&c, _3);
  if (retval.0_8 != 4)
    goto <bb 3>;
  else
    goto <bb 4>;

  <bb 3>:
  abort ();

  <bb 4>:
  c ={v} {CLOBBER};
  return 0;

}

which expands to the correct RTL sequence.

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