This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR29446, VRP ICE
- From: Richard Guenther <rguenther at suse dot de>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 13 Oct 2006 22:04:31 +0200 (CEST)
- Subject: Re: [PATCH] Fix PR29446, VRP ICE
- References: <Pine.LNX.4.44.0610131126530.22244-100000@www.eyesopen.com>
On Fri, 13 Oct 2006, Roger Sayle wrote:
>
> On Fri, 13 Oct 2006, Richard Guenther wrote:
> > 2006-10-13 Richard Guenther <rguenther@suse.de>
> >
> > 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.
--
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs