This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: PR middle-end/39297: [4.4 Regression] gcc.dg/tree-ssa/loop-31.c
- From: Zdenek Dvorak <rakdver at kam dot mff dot cuni dot cz>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Richard Guenther <rguenther at suse dot de>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 25 Feb 2009 19:29:36 +0100
- Subject: Re: PATCH: PR middle-end/39297: [4.4 Regression] gcc.dg/tree-ssa/loop-31.c
- References: <6dc9ffc80902251023j44674ba7v98992c8050967820@mail.gmail.com>
Hi,
> >>> > actually, looking at the issue again, there already is a code dealing
> >>> > with this problem in add_candidate_1; unfortunately, there is a test
> >>> > excluding pointers from being casted to a safe type, which causes
> >>> > PR39233. ?So, it should suffice to remove that test,
> >>>
> >>> Indeed, that works. ?The previous patch bootstrapped and tested ok,
> >>> I'm going to test the simpler one now.
> >>
> >> Done as follows. ?Bootstrapped and tested on x86_64-unknown-linux-gnu,
> >> applied to trunk.
> >>
> >> Thanks,
> >> Richard.
> >>
> >> 2009-02-24 ?Richard Guenther ?<rguenther@suse.de>
> >> ? ? ? ?Zdenek Dvorak ?<ook@ucw.cz>
> >>
> >> ? ? ? ?PR tree-optimization/39233
> >> ? ? ? ?* tree-ssa-loop-ivopts.c (add_candidate_1): Do not except pointers
> >> ? ? ? ?from converting them to a generic type.
> >>
> >> ? ? ? ?* gcc.c-torture/execute/pr39233.c: New testcase.
> >>
> >
> > This patch may be the cause for
> >
> > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39297
> >
> >
>
> There is a problem in PR 39233 only when base is a constant.
> I am testing this patch. OK for trunk if there are regressions on
> Linux/ia32, Linux/ia64 and Linux/x86-64.
no, this is wrong. Even if the base of the variable is not a constant,
there is no guarantee that it does not overflow,
Zdenek