https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128138
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Roger Sayle <[email protected]>: https://gcc.gnu.org/g:2abc365bf623d42d6f50fe532117012890b30602 commit r17-6014-g2abc365bf623d42d6f50fe532117012890b30602 Author: Roger Sayle <[email protected]> Date: Sat Nov 7 12:06:50 2026 +0000 middle-end: PR 128135/PR 128138: Corrections to pow folding. This patch resolves both PR tree-optimization/128135 and PR middle-end/128138, both issues with folding of pow. PR 128138 is a regression caused by silly mistakes/typos in my recent patch to improve folding of pow(-Inf,x). PR 128135 is a much older math-errno issue that seemed reasonable to fix at the same time. 2026-11-07 Roger Sayle <[email protected]> gcc/ChangeLog PR tree-optimization/128135 PR middle-end/12838 * match.pd (pow(x,-1) -> 1/x); Only transform when !flag_errno_math and let fold_const_pow handle cases where x is constant, including appropriate checks for cases where errno may be updated. * real.cc (real_isoddinteger): Fix mistakes. Confirm bits after the decimal point are zero, i.e. test for isoddinteger not isodd. gcc/testsuite/ChangeLog PR tree-optimization/128135 PR middle-end/12838 * gcc.dg/errno-5.c: New test case. * gcc.dg/pr128138.c: Likewise.
