------- Comment #11 from sebpop at gmail dot com 2010-01-08 17:55 -------
Subject: Re: [4.5 Regression] integer wrong code bug
with loop
> Ok, I have that fixed locally at the place of the patch but I wonder if
> initial_condition () shouldn't return for example
>
> Â 1ul for (unsigned long) { 1, +, 1 }_1
>
This is correct.
> and
>
> Â (int) i_2 for (int) { i_2, +, 1 }_1
>
> and further (for short i_2)
>
> Â i_2 for (short) { (int) { i_2, +, 1 }_2, +, 1 }_1
>
> ? Â Can the latter two happen all?
Yes, these could happen, and you are right, we should see
the initial value of a chrec through the type conversion lenses.
> Is it even correct to talk about a
> general initial condition in this case? Â Consider
>
> Â { { 1, +, 1 }_2, +, 1 }_1
>
> initial_condition will return 1 for the chrec even though that is not
> correct because the initial condition is not constant in loop 1.
If you want, there is an initial condition for the loop_1 and that would be
{1, +, 1}_2, and there is an initial condition 1 for loop nest loop_2:
loop_2
i = loop_2_phi (0, i+1) = {1, +, 1}_2
loop_1
j = loop_1_phi (i, j+1) = {{1, +, 1}_2, +, 1}_1
> I suppose I'd only see that if instantiating the chrec at the point
> where I placed the fix? Â So I really only see at most a single outer
> conversion around the chrec?
Yes, I think that at most you can have only one conversion around a chrec.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42512