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

            Bug ID: 70592
           Summary: Addressing error in dynamically-allocated character
                    array
           Product: gcc
           Version: 5.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: KnowlesPJ at Cardiff dot ac.uk
  Target Milestone: ---

Created attachment 38217
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38217&action=edit
failing test case

The attached code incorrectly prints '666666' as its last line instead of
'123456' apparently because the program thinks that the addresses of all
elements of the array are the same.

The compiler also produces the somewhat cryptic warning


  CHARACTER(len=:), DIMENSION(:), POINTER :: cp
 ^
Warning: '.cp' is used uninitialized in this function [-Wuninitialized]

Reply via email to