[Bug tree-optimization/126724] The check for SIDE EFFECTS on match patterns should be using expr_no_side_effects_p instead
"rguenth at gcc dot gnu.org via Gcc-bugs" <[email protected]>
| Newsgroups | gmane.comp.gcc.bugs |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126724
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu.org
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I'll note that genmatch tries to automate parts of the required side-effect
queries, extending it to cover substitution into (cond ..) (or vec_cond?)
should be possible.
Note in the cited pattern making a trap conditional should be fine, we
are in other places happily sinking pointer dereferences. We just may
not _introduce_ new traps.
So IMHO this specific case is correct.