This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/25030] New: Character pointer can associated with not the same length character variable.
- From: "iguchi at coral dot t dot u-tokyo dot ac dot jp" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Nov 2005 08:55:54 -0000
- Subject: [Bug fortran/25030] New: Character pointer can associated with not the same length character variable.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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