This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] for PRs 27639 and 26719
Hello,
> > Yes, somewhere there's a bug... do you have a testcase, btw?
>
> Attached. Compile at -O2 on x86 after redirecting your system.ads file to
> system-solaris-x86.ads.
I do not see anything principially wrong with the code that ivopts
produces; I think this is simply a VRP bug. We have a variable that
looks like
ivtmp.86D.1158_14 = PHI <ivtmp.86D.1158_80(24), ivtmp.86D.1158_77(9)>;
ivtmp.86D.1158_80 = ivtmp.86D.1158_14 + 1;
In type with min = 1 and max = 2147483647. The range of
ivtmp.86D.1158_77 is <1, 2147483647>. The range of
ivtmp.86D.1158_80 oscilates in the infinite loop between <2,2147483647>
and <2,0x80000000>; range of ivtmp.86D.1158_14 is always <1,2147483647>,
but the type of the upper bound of the range oscilates between
the type of the expression (positive___XDLU_1__2147483647) and
type "integer" (with range from -2147483648 to 2147483647).
Both the invalid range <2,0x80000000> and the "integer" type of the upper bound
of the range of ivtmp.86D.1158_14 seem suspicious to me, and probably
closer to the real reason for the problem than the changes in scev analysis.
Zdenek