https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96369
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-8 branch has been updated by Richard Biener <[email protected]>: https://gcc.gnu.org/g:371ae12cf3b22795246a5707017f07257b5cbc97 commit r8-10803-g371ae12cf3b22795246a5707017f07257b5cbc97 Author: Richard Biener <[email protected]> Date: Fri Jul 31 08:41:56 2020 +0200 middle-end/96369 - fix missed short-circuiting during range folding This makes the special case of constant evaluated LHS for a short-circuiting or/and explicit rather than doing range merging and eventually exposing a side-effect that shouldn't be evaluated. 2020-07-31 Richard Biener <[email protected]> PR middle-end/96369 * fold-const.c (fold_range_test): Special-case constant LHS for short-circuiting operations. * c-c++-common/pr96369.c: New testcase. (cherry picked from commit 505767905735a3c8f171c140108ee263f9fdcad6)
