Commit 64ff24b3 by Tobias Burnus Committed by Tobias Burnus

re PR fortran/54818 (error: type mismatch in binary expression)

2012-12-20  Tobias Burnus  <burnus@net-b.de>

        PR fortran/54818
        * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Ensure that
        the string length is of type gfc_charlen_type_node.

2012-12-20  Tobias Burnus  <burnus@net-b.de>

        PR fortran/54818
        * gfortran.dg/transfer_intrinsic_4.f: New.

From-SVN: r194628
parent d19a6672
2012-12-20 Tobias Burnus <burnus@net-b.de>
PR fortran/54818
* trans-intrinsic.c (gfc_conv_intrinsic_transfer): Ensure that
the string length is of type gfc_charlen_type_node.
2012-12-19 Paul Thomas <pault@gcc.gnu.org> 2012-12-19 Paul Thomas <pault@gcc.gnu.org>
* array.c (resolve_array_list): Apply C4106. * array.c (resolve_array_list): Apply C4106.
......
...@@ -5662,7 +5662,7 @@ scalar_transfer: ...@@ -5662,7 +5662,7 @@ scalar_transfer:
gfc_add_expr_to_block (&se->pre, tmp); gfc_add_expr_to_block (&se->pre, tmp);
se->expr = tmpdecl; se->expr = tmpdecl;
se->string_length = dest_word_len; se->string_length = fold_convert (gfc_charlen_type_node, dest_word_len);
} }
else else
{ {
......
2012-12-20 Tobias Burnus <burnus@net-b.de>
PR fortran/54818
* gfortran.dg/transfer_intrinsic_4.f: New.
2012-12-19 Paul Thomas <pault@gcc.gnu.org> 2012-12-19 Paul Thomas <pault@gcc.gnu.org>
* gfortran.dg/unlimited_polymorphic_1.f03: New test. * gfortran.dg/unlimited_polymorphic_1.f03: New test.
......
! { dg-do compile }
!
! PR fortran/54818
!
! Contributed by Scott Pakin
!
subroutine broken ( name1, name2, bmix )
implicit none
integer, parameter :: i_knd = kind( 1 )
integer, parameter :: r_knd = selected_real_kind( 13 )
character(len=8) :: dum
character(len=8) :: blk
real(r_knd), dimension(*) :: bmix, name1, name2
integer(i_knd) :: j, idx1, n, i
integer(i_knd), external :: nafix
write (*, 99002) name1(j),
& ( adjustl(
& transfer(name2(nafix(bmix(idx1+i),1)),dum)//blk
& //blk), bmix(idx1+i+1), i = 1, n, 2 )
99002 format (' *', 10x, a8, 8x, 3(a24,1pe12.5,',',6x))
end subroutine broken
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment