tree-optimization/108547 - robustify uninit predicate analysis
authorRichard Biener <rguenther@suse.de>
Thu, 26 Jan 2023 07:59:20 +0000 (08:59 +0100)
committerRichard Biener <rguenther@suse.de>
Thu, 26 Jan 2023 12:49:30 +0000 (13:49 +0100)
commitc71a128a3e1ff6ee5274fc2df49ea650bc9e6c2d
treef49abe9f802133f27a862a980a40e74e72d4b53e
parent0573a0778af88e805f7630ac8640ecd67d692665
tree-optimization/108547 - robustify uninit predicate analysis

Predicate analysis, when looking through casts doesn't bother to
convert boundary constants to the type of the bounded variables.
The following robustifies value_sat_pred_p to use widest_ints
to deal with this, like other code in predicate analysis.

PR tree-optimization/108547
* gimple-predicate-analysis.cc (value_sat_pred_p):
Use widest_int.

* gcc.dg/uninit-pr108547.c: New testcase.
gcc/gimple-predicate-analysis.cc
gcc/testsuite/gcc.dg/uninit-pr108547.c [new file with mode: 0644]