[Bug tree-optimization/29516] gfortran miscompiled
fxcoudert at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Jan 2 14:46:00 GMT 2007
------- Comment #10 from fxcoudert at gcc dot gnu dot org 2007-01-02 14:46 -------
Hi Eric, any news on that one? It really is a pain, because it's apparently a
target-specific middle-end bug that miscompiles gfortran on a platform where
people are really starting to use it for production...
Just in case, here's a summary of the problem: in gcc/fortran/trans-array.c
(gfc_conv_array_transpose), the following gets miscompiled:
for (n = 0; n < 2; n++)
{
dest_info->delta[n] = gfc_index_zero_node;
dest_info->start[n] = gfc_index_zero_node;
dest_info->stride[n] = gfc_index_one_node;
dest_info->dim[n] = n;
dest_index = gfc_rank_cst[n];
src_index = gfc_rank_cst[1 - n]; // This is the miscompiled statement
/* ... */
}
When the statement indicated is replaced by, e.g., src_index = gfc_rank_cst[n
== 0 ? 1 : 0], everything is OK. It appears that the VRP is responsible for
that (see the tree dumps provided by Tobias).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29516
More information about the Gcc-bugs
mailing list