------- Comment #7 from burnus at gcc dot gnu dot org 2007-08-02 20:56 ------- CONJ_EXPR< a.data[0*1+(-2)]> The offset = -2 is generated in gfc_conv_expr_descriptor:
offset = gfc_index_zero_node; for (n = 0; n < ndim; n++) // ndim = 2 start = info->start[dim]; // start = 0; tmp = gfc_conv_array_lbound (desc, n); // "tmp = 1" // "tmp = 0 - 1 = -1" tmp = fold_build2 (MINUS_EXPR, TREE_TYPE (tmp), start, tmp); // tmp = tmp * 1 = -1 tmp = fold_build2 (MULT_EXPR, TREE_TYPE (tmp), tmp, stride); // offset = offset + tmp = offset + (-1) offset = fold_build2 (PLUS_EXPR, TREE_TYPE (tmp), offset, tmp); Still, I don't quite understand how it is supposed to work. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32962