This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/66499] Letters with accents change format behavior for X and T descriptors.


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66499

--- Comment #3 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
The trimmed length is incorrect.

With this test:

program test_character
  real:: a
  character(len=2, kind=4):: char1, char2

  char2 = 4_"Ã"

  open(6, encoding="utf-8")

  write(*,'(a)') trim(char2)
  !print *, len(trim(char2),4)
end program


The length computed for len(trim(char2),4) is 2.

$ ./a.out >test.out 
[jerry@amda8 pr66499]$ xxd test.out 
00000000: c383 c283 0a     

We have an extra word being emitted.  Two extra bytes.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]