https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94675

--- Comment #12 from Jeffrey A. Law <law at redhat dot com> ---
SO it's not terrible to get the key block cleaned up.  but that's not
sufficient to resolve this issue.  We all missed an important tidbit.


VRP is complaining about this:

  ps.D.2041.s = &MEM <byte> [(void *)&c + 7B];


Note the object we reference in the &MEM expression, "c".  "c" is a byte:

typedef unsigned char byte;
byte c;


One could argue the problem is FRE.  Prior to fre3 we had:

;;   basic block 9, loop depth 0
;;    pred:       7
  _34 = ps.D.2041.s;
  _35 = _34 + 7;
  ps.D.2041.s = _35;

fre3 turns that into:

  ps.D.2041.s = &MEM <byte> [(void *)&c + 7B];

And we're going to lose.

One could also argue that the warning has to be tolerant of these actions from
FRE.  The question would be how to do that without totally compromising the
warning.

Reply via email to