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/25030] New: Character pointer can associated with not the same length character variable.


In the following program, pointer association is not allowd.
But I can compile successfully, and get the output of random character
string whose length is 999.

I think this is wrong behavior.

program char_array_const
  implicit none
  character(len=999), pointer :: p
  character(len=12), target :: string = "test string"

  p => string
  print *, trim(p)
end program


-- 
           Summary: Character pointer can associated with not the same
                    length character variable.
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: iguchi at coral dot t dot u-tokyo dot ac dot jp


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25030


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