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: [PATCH] avoid assuming all integers are representable in HOST_WIDE_INT (PR #80497)


On Tue, Apr 25, 2017 at 08:24:32AM -0600, Jeff Law wrote:
> On 04/24/2017 05:35 PM, Martin Sebor wrote:
> > Bug 80497 brings to light that my fix for PR 80364 where I corrected
> > the handling for int128_t was incomplete.  I handled the non-constant
> > case but missed the INTEGER_CST case just a few lines above.  The
> > attached patch also corrects that problem plus one more elsewhere
> > in the pass.
> > 
> > Both of the changes in this patch seem safe enough to make even now
> > in GCC 7 but since they are ice-on-invalid-code perhaps it's better
> > to wait for 7.1?
> > 
> > Martin
> > 
> > gcc-80497.diff
> > 
> > 
> > PR tree-optimization/80497 - ICE at -O1 and above on valid code on x86_64-linux-gnu in tree_to_uhwi
> > 
> > gcc/ChangeLog:
> > 
> > 	PR tree-optimization/80497
> > 	* gimple-ssa-sprintf.c (get_int_range): Avoid assuming all integer
> > 	constants are representable in HOST_WIDE_INT.
> > 	(parse_directive): Ditto.
> > 
> > gcc/testsuite/ChangeLog:
> > 
> > 	PR tree-optimization/80497
> > 	* gcc.dg/tree-ssa/builtin-sprintf-warn-17.c: New test.
> OK for the trunk.  Jakub's call on when it's OK for the branch -- one can
> easily argue this is a regression.

Ok for 7.1 if you manage to commit before 7.1rc1, otherwise ok for 7.2.

	Jakub


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