This is the mail archive of the gcc-patches@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]

Re: enable -Wformat-truncation with -Og (PR 79691)


On Fri, Feb 24, 2017 at 11:10:51AM +0100, Richard Biener wrote:
> On Fri, Feb 24, 2017 at 1:35 AM, Martin Sebor <msebor@gmail.com> wrote:
> > Bug 79691 - -Wformat-truncation suppressed by (and only by) -Og
> > points out that the gimple-ssa-sprintf pass doesn't run when
> > this optimization option is used.  That's because I forgot to
> > add it to the set of optimization passes that run with that
> > option.  The attached trivial patch tested on x86_64 corrects
> > the oversight.
> >
> > Is this okay for 7.0?
> 
> Any reason for the placement before copy-prop?  I'd have done it
> after pass_late_warn_uninitialized for example.
> 
> Also doesn't pass_sprintf_length rely on get_range_info ()?  With -Og
> nothing populates those so you'll always get effectively VARYING ranges.

-O0 and -O1 are the same case with that though.

	Jakub


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