* trans-stmt.c (gfc_trans_character_select): Be conversion-safe while
checking string length value.
* trans-intrinsic.c (gfc_conv_intrinsic_char): Build integer using
gfc_charlen_type_node type.
PR fortran/45564
* trans-intrinsic.c (gfc_conv_intrinsic_transfer): Convert string
length to gfc_charlen_type_node.
2010-09-07 Mikael Morin <mikael@gcc.gnu.org>
* gfortran.dg/achar_4.f90: Enable bounds checking.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163958
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-09-07 Mikael Morin <mikael@gcc.gnu.org>
+
+ * trans-stmt.c (gfc_trans_character_select): Be conversion-safe while
+ checking string length value.
+ * trans-intrinsic.c (gfc_conv_intrinsic_char): Build integer using
+ gfc_charlen_type_node type.
+
+ PR fortran/45564
+ * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Convert string
+ length to gfc_charlen_type_node.
+
2010-09-06 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/36931
arg[0] = fold_build1_loc (input_location, NOP_EXPR, type, arg[0]);
gfc_add_modify (&se->pre, var, arg[0]);
se->expr = gfc_build_addr_expr (build_pointer_type (type), var);
- se->string_length = integer_one_node;
+ se->string_length = build_int_cst (gfc_charlen_type_node, 1);
}
se->expr = info->descriptor;
if (expr->ts.type == BT_CHARACTER)
- se->string_length = dest_word_len;
+ se->string_length = fold_convert (gfc_charlen_type_node, dest_word_len);
return;
gfc_init_block (&body);
/* Attempt to optimize length 1 selects. */
- if (expr1se.string_length == integer_one_node)
+ if (integer_onep (expr1se.string_length))
{
for (d = cp; d; d = d->right)
{
+2010-09-07 Mikael Morin <mikael@gcc.gnu.org>
+
+ * gfortran.dg/achar_4.f90: Enable bounds checking.
+
2010-09-07 Uros Bizjak <ubizjak@gmail.com>
PR target/45206
! { dg-do run }
+! { dg-options "-fbounds-check" }
! Tests the fix for PR31257, in which achar caused an ICE because it had no
! charlen.
!