[Bug tree-optimization/126650] [13/14/15/16 Regression] Wrong code at -O2/3/s on x86_64-pc-linux-gnu
"cvs-commit at gcc dot gnu.org via Gcc-bugs" <[email protected]>
| Newsgroups | gmane.comp.gcc.bugs |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126650 --- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-16 branch has been updated by Richard Biener <[email protected]>: https://gcc.gnu.org/g:4e9903e714e49f4cb51ff2b687d73beb296e6f55 commit r16-9557-g4e9903e714e49f4cb51ff2b687d73beb296e6f55 Author: Richard Biener <[email protected]> Date: Wed Aug 5 10:31:47 2026 +0200 tree-optimization/126650 - get_inner_reference_aff and bitfields get_inner_reference_aff tries to compensate for bit precision offsets and sizes by rounding down and up, but fails to do this correctly. The following makes it more obviously correct by rounding positions and computing the rounded size based on those. PR tree-optimization/126650 * tree-affine.cc (get_inner_reference_aff): Fixup rounding of size. * gcc.dg/torture/pr126650.c: New testcase. (cherry picked from commit 9baaca2adeca178edf8c0816ef328dba1cf270bc)