This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/22442] [4.1 regression] scev cprop causes wrong code
- From: "rakdver at atrey dot karlin dot mff dot cuni dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Jul 2005 14:58:11 -0000
- Subject: [Bug tree-optimization/22442] [4.1 regression] scev cprop causes wrong code
- References: <20050712142053.22442.belyshev@depni.sinp.msu.ru>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From rakdver at atrey dot karlin dot mff dot cuni dot cz 2005-07-12 14:58 -------
Subject: Re: New: scev cprop causes wrong code
> // fork from bug 22230
> // fails with -O1
> // doesn't fail with -O1 -fno-tree-ccp -fno-tree-dominator-opts
> // introduced between 2005-05-17 2005-05-18
>
> void abort (void);
>
> int main (void)
> {
> int a, i;
>
> for (i = 0; i < 5; i++)
> a = i * i;
> if (a != 16)
> abort ();
> return 0;
> }
this seems to be a bug in scev. It claims that evolution of a is
{{0, +, 1}_1, +, 2}_1. However, the evolution should be
{0, +, {1, +, 2}_1}_1, as far as I can tell.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22442