This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32382] missed optimization in internal read
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Jun 2007 03:13:43 -0000
- Subject: [Bug fortran/32382] missed optimization in internal read
- References: <bug-32382-9562@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from jvdelisle at gcc dot gnu dot org 2007-06-23 03:13 -------
This problem is frontend related. We are building the switch case that tests
for the error conditions outside the loop that is constructed to do the scaler
transfers. Thus:
i = 1;
if (i <= 1000000)
{
while (1)
{
{
logical4 D.1371;
_gfortran_transfer_integer (&dt_parm.2,
&intvalues[(int8) i + -1], 4);
L.4:;
D.1371 = i == 1000000;
i = i + 1;
if (D.1371) goto L.5;
}
}
}
L.5:;
_gfortran_st_read_done (&dt_parm.2);
switch (dt_parm.2.common.flags & 3)
{
case 1:;
goto __label_000020;
case 2:;
goto __label_000020;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32382