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: PR middle-end/39297: [4.4 Regression] gcc.dg/tree-ssa/loop-31.c


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


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