]> git.ipfire.org Git - thirdparty/gcc.git/commit
Don't calculate new values when using the private context callback.
authorAndrew MacLeod <amacleod@redhat.com>
Mon, 8 Nov 2021 14:32:42 +0000 (09:32 -0500)
committerAndrew MacLeod <amacleod@redhat.com>
Mon, 8 Nov 2021 17:48:57 +0000 (12:48 -0500)
commit0cd653bd2559701da9cc4c9bf51f22bdd68623b5
treeb36c9cdffb096752d1755baa7f56ad6d4c00db41
parent33a7a63275c959f97b25064cfbe3e7f0dc7f7e9c
Don't calculate new values when using the private context callback.

When using rangers private callback mechanism to provide context
to fold_stmt calls, we are only suppose to be using the cache in read
only mode, never calculate new values.

gcc/
PR tree-optimization/103122
* gimple-range.cc (gimple_ranger::range_of_expr): Request the cache
entry with "calulate new values" set to false.

gcc/testsuite/
* g++.dg/pr103122.C: New.
gcc/gimple-range.cc
gcc/testsuite/g++.dg/pr103122.C [new file with mode: 0644]