]> git.ipfire.org Git - thirdparty/gcc.git/commit
middle-end/96369 - fix missed short-circuiting during range folding
authorRichard Biener <rguenther@suse.de>
Fri, 31 Jul 2020 06:41:56 +0000 (08:41 +0200)
committerGiuliano Belinassi <giuliano.belinassi@usp.br>
Mon, 17 Aug 2020 16:20:21 +0000 (13:20 -0300)
commit11a630f20c766ffa91cfe323e02bb7a0e55e5cff
tree49eedb0ff616a266d6ec659419aef8c1c526654d
parent24893cb6c1b8c56863331b6532a5f601c6f6c910
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  <rguenther@suse.de>

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.
gcc/fold-const.c
gcc/testsuite/c-c++-common/pr96369.c [new file with mode: 0644]