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

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So I had assumed (maybe incorrectly), if we had:
  MEM[(struct RefitOption *)__val] = *.LC0;
  __trans_tmp_2 = MEM[(const struct RefitOption &)__val];

That both of these would be marked as trapping. But in it looks like in Ada,
TREE_THIS_NOTRAP is set for the first one but not the second one. So you end up
with a situtation here the first statement is marked as nothrow and we then
prop the load from *.LC0 into the second one.

There is no way to express this with C++ code nor there is a way to express
this using gimple front-end.

What could have helped me is printing out TREE_THIS_NOTRAP on the MEM to see
that was set on the first MEM.

Reply via email to