aboutsummaryrefslogtreecommitdiff
path: root/gcc/system.h
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2024-06-23 14:37:53 +0200
committerRichard Biener <rguenther@suse.de>2024-06-24 09:18:02 +0200
commitae13af26060eb686418ea9c9d455cd665049402d (patch)
treec7366b7af35eebf636a1ad6b81c15f2343445db7 /gcc/system.h
parent6274f10318d05311f31147c895f76a01aec37830 (diff)
downloadgcc-ae13af26060eb686418ea9c9d455cd665049402d.zip
gcc-ae13af26060eb686418ea9c9d455cd665049402d.tar.gz
gcc-ae13af26060eb686418ea9c9d455cd665049402d.tar.bz2
tree-optimization/115599 - reassoc qsort comparator issue
The compare_repeat_factors comparator fails qsort checking eventually because it uses rf2->rank - rf1->rank to compare unsigned numbers which causes issues for ranks that interpret negative as signed. Fixed by re-writing the obvious way. I've also fixed the count comparison which suffers from truncation as count is 64bit signed while the comparator result is 32bit int (that's a lot less likely to hit in practice though). The testcase from the PR is too large to include. PR tree-optimization/115599 * tree-ssa-reassoc.cc (compare_repeat_factors): Use explicit compares to avoid truncations.
Diffstat (limited to 'gcc/system.h')
0 files changed, 0 insertions, 0 deletions