This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/78696] [7 Regression] -fprintf-return-value misoptimizes %.Ng where N is greater than 10


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

--- Comment #14 from James Greenhalgh <jgreenhalgh at gcc dot gnu.org> ---
(In reply to Martin Sebor from comment #13)
> Created attachment 40272 [details]
> Lightly tested patch.
> 
> (In reply to Martin Sebor from comment #6)
> 
> After some more testing, although the patch I showed happens to fix the
> problem in the test case, it's not actually correct.  I found a few other
> subtle issues in the function that need to fixed.  I'm testing a more
> comprehensive patch that should fix it the right way.

This patch also fixes the issue I've been seeing with the code base which is
being miscompiled.

Did you accidentally commit it as part of r243419? I don't see the changes
marked in your ChangeLog, nor did you tag that revision as a fix for this bug,
but the code above has found its way in to trunk, and so the failures I've been
seeing with our code base have been fixed.

I've got no opinion on whether the pass should be disabled by default - I do
agree with Joseph's points that this seems like it has the potential to
introduce or mask some very frightening security issues if a library is
non-conformant.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]