char_pointer_assign_icb_1.f90
412 Bytes
-
PR 50892 Latent bug in char pointer assignment · ee2d3987
Due to r256284 (PR 78534) there was a latent bug that reared it's head due to different character length types in the pointer assignment. Fixed by this patch, which also adds a reduced testcase. Regtested on x86_64-pc-linux-gnu, committed to trunk as obvious. gcc/fortran/ChangeLog: 2018-01-06 Janne Blomqvist <jb@gcc.gnu.org> PR fortran/50892 * trans-expr.c (gfc_trans_pointer_assignment): fold_convert rhs to lhs type. gcc/testsuite/ChangeLog: 2018-01-06 Janne Blomqvist <jb@gcc.gnu.org> PR fortran/50892 * gfortran.dg/char_pointer_assign_icb_1.f90: New test. From-SVN: r256310
Janne Blomqvist committed