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

            Bug ID: 84070
           Summary: Incorrect assignment to allocatable character variable
           Product: gcc
           Version: 7.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: walt.brainerd at gmail dot com
  Target Milestone: ---

character(len=:), allocatable :: c
c = "abc"
print *, "A" // c // "Z"
c = c(1:0) // c(2:)
print *, "A" // c // "Z"
print *, iachar(" "), iachar(c(2:2))
end

PROFITOOL+WAB@DEN-000256L /cygdrive/c
$ !.
./a
 AabcZ
 Ab Z
          32          32

Note missing character "c" after assignment.
It is instead a space.

Reply via email to