Commit 167f281e by Michael Matz Committed by Michael Matz

trans-expr.c (gfc_conv_string_tmp): Check type compatibility instead of equality.

fortran/
        * trans-expr.c (gfc_conv_string_tmp): Check type compatibility
        instead of equality.

testsuite/
        * gfortran.dg/pr41126.f90: New test.

From-SVN: r150964
parent 456976d8
2009-08-20 Michael Matz <matz@suse.de>
PR fortran/41126
* trans-expr.c (gfc_conv_string_tmp): Check type compatibility
instead of equality.
2009-08-20 Janus Weil <janus@gcc.gnu.org> 2009-08-20 Janus Weil <janus@gcc.gnu.org>
PR fortran/41121 PR fortran/41121
......
...@@ -1104,7 +1104,7 @@ gfc_conv_string_tmp (gfc_se * se, tree type, tree len) ...@@ -1104,7 +1104,7 @@ gfc_conv_string_tmp (gfc_se * se, tree type, tree len)
tree var; tree var;
tree tmp; tree tmp;
gcc_assert (TREE_TYPE (len) == gfc_charlen_type_node); gcc_assert (types_compatible_p (TREE_TYPE (len), gfc_charlen_type_node));
if (gfc_can_put_var_on_stack (len)) if (gfc_can_put_var_on_stack (len))
{ {
......
2009-08-20 Michael Matz <matz@suse.de>
PR fortran/41126
* gfortran.dg/pr41126.f90: New test.
2009-08-20 Eric Botcazou <ebotcazou@adacore.com> 2009-08-20 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/dynamic_bound.adb: New test. * gnat.dg/dynamic_bound.adb: New test.
......
! { dg-do compile }
SUBROUTINE write_cputime( checkpoint )
CHARACTER(LEN=*), INTENT(IN) :: checkpoint
CHARACTER(LEN=LEN_TRIM(checkpoint)+7) :: string1
string1 = ADJUSTL(string1)
END SUBROUTINE write_cputime
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