[Bug fortran/92325] -fdump-tree-original and char(kind=4) initializations
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92325 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2020-01-30 CC||marxin at gcc dot gnu.org Ever confirmed|0 |1
[Bug fortran/92325] -fdump-tree-original and char(kind=4) initializations
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92325 --- Comment #3 from anlauf at gcc dot gnu.org --- (In reply to Bernd Edlinger from comment #2) > But, I admit, when I initially learned fortran, F77 was still brand new. > Can someone explain to me what is this program is supposed to do? Well, character(kind=1) is the default character kind (1-byte ASCII) that you know from F77. Fortran 2003 added support for other character sets, such as ISO_10646, which uses 4 bytes/character and is therefore represented by kind=4 in gfortran. 4_'ABC' is the literal "ABC" in this character set, etc. The program in comment#0 works just fine. It prints AABABC.
[Bug fortran/92325] -fdump-tree-original and char(kind=4) initializations
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92325 Bernd Edlinger changed: What|Removed |Added CC||msebor at gcc dot gnu.org --- Comment #2 from Bernd Edlinger --- Right, Fortran does not use zero terminated strings, I think Martin changed the way how non-printable characters are output, the new output might be more correct, but maybe it swallows the final \x00 since that is not a null-terminated string in fortran. But, I admit, when I initially learned fortran, F77 was still brand new. Can someone explain to me what is this program is supposed to do?
[Bug fortran/92325] -fdump-tree-original and char(kind=4) initializations
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92325 Richard Biener changed: What|Removed |Added CC||edlinger at gcc dot gnu.org --- Comment #1 from Richard Biener --- IIRC Bernd changed this. IIRC fortran strings are not NUL terminated.
[Bug fortran/92325] -fdump-tree-original and char(kind=4) initializations
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92325 anlauf at gcc dot gnu.org changed: What|Removed |Added Priority|P3 |P5