+2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ PR fortran/36265
+ * trans-expr.c (gfc_conv_string_tmp): Pick the correct type for
+ the temporary variable.
+
2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
* simplify.c (gfc_simplify_dble, gfc_simplify_real): Initialize
tmp = fold_build2 (MINUS_EXPR, gfc_charlen_type_node, len,
build_int_cst (gfc_charlen_type_node, 1));
tmp = build_range_type (gfc_array_index_type, gfc_index_zero_node, tmp);
- tmp = build_array_type (TREE_TYPE (TREE_TYPE (type)), tmp);
+
+ if (TREE_CODE (TREE_TYPE (type)) == ARRAY_TYPE)
+ tmp = build_array_type (TREE_TYPE (TREE_TYPE (type)), tmp);
+ else
+ tmp = build_array_type (TREE_TYPE (type), tmp);
+
var = gfc_create_var (tmp, "str");
var = gfc_build_addr_expr (type, var);
}
+2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ PR fortran/36265
+ * gfortran.dg/char_length_11.f90: New test.
+
2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
* gfortran.dg/widechar_intrinsics_5.f90: Add dg-do directive and