This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/20923] Compile time is high for the following code
- From: "tobi at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 May 2005 22:19:31 -0000
- Subject: [Bug fortran/20923] Compile time is high for the following code
- References: <20050409221505.20923.pinskia@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From tobi at gcc dot gnu dot org 2005-05-19 22:19 -------
One more thing I forgot to mention: for n = 100 the .original dump looks like this:
int4 offset.1;
struct array1_int4 atmp.0;
atmp.0.dtype = 265;
atmp.0.dim[0].stride = 1;
atmp.0.dim[0].lbound = 0;
atmp.0.dim[0].ubound = 9999;
atmp.0.data = (int4[0:] *) _gfortran_internal_malloc (40000);
atmp.0.offset = 0;
offset.1 = 0;
j = 1;
while (1)
{
if (j > 100) goto L.1; else (void) 0;
(*atmp.0.data)[offset.1] = j + 4;
offset.1 = offset.1 + 1;
(*atmp.0.data)[offset.1] = j + 5;
offset.1 = offset.1 + 1;
(*atmp.0.data)[offset.1] = j + 6;
offset.1 = offset.1 + 1;
(*atmp.0.data)[offset.1] = j + 7;
...
offset.1 = offset.1 + 1;
(*atmp.0.data)[offset.1] = j + 102;
offset.1 = offset.1 + 1;
(*atmp.0.data)[offset.1] = j + 103;
offset.1 = offset.1 + 1;
j = j + 1;
etc.
which is probably not what we want. The optimizers can't reduce this to the
original form either.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20923