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

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
It's even "wrong-code" it seems.  IPA SRA is confused about the K&R style
functions and

static fn3 (dpy, winInfo, visrgn) struct _XDisplay *dpy;
{
  int b = fn1 (0, winInfo);
  fn4 (0, 0, visrgn);
}

winInfo having type 'int' here.  Not sure how I exposed that with the
patch though ...

At least the testcase is broken.  When I add a proper type to winInfo in fn3
it works.

Martin, do we want to guard IPA SRA against this sort of bogosities?

As of the actual transform it seems that IPA SRA misses to adjust accesses
when it removes unused params ;)  (well, not actually unused ... heh)

That said, can you look into it?  You are more familiar with IPA SRA and
where we'd add a sanity check that argument type and formal parameter type
match (and thus local analysis is valid).

Reply via email to