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: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jun 2005 23:17:54 -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 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;
}
--------------------
g/x> /home/bangerth/bin/gcc-4.1-pre/bin/gcc -c x.cc -O2 -ftree-loop-linear
x.cc: In function ‘int foo()’:
x.cc:1: error: Definition in block 9 does not dominate use in block 3
for SSA_NAME: s_11 in statement:
s_7 = PHI <s_11(3)>;
PHI argument
s_11
for PHI node
s_7 = PHI <s_11(3)>;
x.cc:1: internal compiler error: verify_ssa failed.
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20256