This is the mail archive of the 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] Fix PR29446, VRP ICE

On Fri, 13 Oct 2006, Roger Sayle wrote:

> On Fri, 13 Oct 2006, Richard Guenther wrote:
> > 2006-10-13  Richard Guenther  <>
> >
> > 	PR tree-optimization/29446
> > 	* tree-vrp.c (fix_equivalence_set): Remove.
> > 	(extract_range_from_assert): Do not call fix_equivalence_set.
> > 	(debug_value_range): Print a newline.
> > 	(compare_name_with_value): For equivalence sets with
> > 	inconsistent value ranges conservatively bail out.
> > 	(compare_names): Likewise.
> >
> > 	* gcc.dg/torture/pr29446.c: New testcase.
> This is OK for mainline.  I like the idea of a tri-state result; true,
> false and don't-know.  I'm not as convinced about a fourth-state for
> inconsistent, as (as you've pointed out), this normally reflects that
> we just haven't performed a clean-up yet.  I think its better to do
> as little as possible ("first do no harm") in code that is unreachable
> and scheduled for deletion.

Sure, this is the reason for how the patch is at the moment.  I believe
the checking code was added to catch cases where VRP produces invalid
value ranges - the "fixup" for the valid cases was added later.  With
this patch we lose the ability to check consistency at compile time
(because I believe this is impossible in general and has just caused
too many false-positive problems).  With the fourth state and placing
runtime abortion code we would have that VRP consistency checking
re-enabled (though at runtime).  Now, it isn't easy to add this feature
(I tried for a moment), as the only user of the affected code is VRP
jump-threading and I have no idea how to easily identify the correct
place to insert the trap - or I didn't think long enough.


Richard Guenther <>
Novell / SUSE Labs

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