This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/20256] Perfect nest transformation not conservative enough
- From: "dberlin at dberlin dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Jun 2005 00:11:15 -0000
- Subject: [Bug tree-optimization/20256] Perfect nest transformation not conservative enough
- References: <20050301012709.20256.fjahanian@apple.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From dberlin at gcc dot gnu dot org 2005-06-29 00:11 -------
Subject: Re: Perfect nest transformation not
conservative enough
On Tue, 2005-06-28 at 23:17 +0000, bangerth at dealii dot org wrote:
> ------- Additional Comments From bangerth at dealii dot org 2005-06-28 23:17 -------
> Andrew's code in comment #4 is invalid (don't call no-arg functions with
> arguments!), but here's a version that also passes through the c++
> frontend and crashes the optimizers:
>
> ----------------------
> int foo() {
> int x[2][2], y[2];
> int s;
> for (int n=0; n<2; n++)
> {
> s = 0;
> for (int i=0; i<2; i++)
> s += x[n][i]*y[i];
> s += 1;
> }
> return s;
> }
> --------------------
>
yeah, we shouldn't be trying to transform this :)
at least, not with the current scheme
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20256