------- Comment #21 from dominiq at lps dot ens dot fr 2009-01-14 08:15 ------- On i686-apple-darwin9 I cannot test the valgrind part of this pr, however with the patch in http://gcc.gnu.org/ml/fortran/2009-01/msg00162.html the following test now succeeds:
character(len=1) :: string = "z" character(len=20) :: tmp = "" tmp = Upper ("abcdefgh") print *, tmp contains Character (len=20) Function Upper (string) Character(len=*) string integer :: ij print *, len(string) print *, size(transfer(string,"xy",len(string))) i = size(transfer(string,"xy",len(string))) if (i /= len(string)) call abort() Upper = "" Upper(1:2) = & transfer(merge(transfer(string,"xy",len(string)), & string(1:2), .true.), "xy") return end function Upper end (coming from pr31608). I saw one regression on char_cast_1.f90 which needs some adjustment of the test, the following change allows it to pass: --- ../_gcc_clean/gcc/testsuite/gfortran.dg/char_cast_1.f90 2008-05-19 14:20:35.000000000 +0200 +++ gcc/testsuite/gfortran.dg/char_cast_1.f90 2009-01-14 07:37:03.000000000 +0100 @@ -27,5 +27,5 @@ end ! The sign that all is well is that [S.5][1] appears twice. ! Platform dependent variations are [S$5][1], [__S_5][1], [S___5][1] -! { dg-final { scan-tree-dump-times "5\\\]\\\[1\\\]" 2 "original" } } +! { dg-final { scan-tree-dump-times "6\\\]\\\[1\\\]" 2 "original" } } ! { dg-final { cleanup-tree-dump "original" } } >From the comment the test seems fragile and should probably changed to something more robust. Thanks for the patch. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34955