https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106415
--- Comment #1 from Undefined Opcode <undefinedopcode2 at gmail dot com> --- Adding `-fno-tree-loop-ivcanon -fno-ivopts` to the compiler flags ensures the second example function gets a properly optimized DBRA loop.