[Bug tree-optimization/125653] [17 regression] glibc printf miscompiled since r17-1238-g8e3eff39a4564c

rsandifo at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jun 8 07:25:44 GMT 2026


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125653

--- Comment #12 from Richard Sandiford <rsandifo at gcc dot gnu.org> ---
Created attachment 64667
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=64667&action=edit
Candidate patch

The early return bypassed the later:

          /* If STMT is a phi, remove any information recorded for
             its arguments.  */
          if (is_a <gphi *> (stmt))
            reprocess_inputs (stmt);

I'm testing the attached patch against the GCC testsuite, but it'd be great if
you could check that it fixes glibc.


More information about the Gcc-bugs mailing list