[Bug fortran/63232] New: Deferred length character field of derived type looses its value when used in subroutine call
baradi09 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Sep 11 21:13:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63232
Bug ID: 63232
Summary: Deferred length character field of derived type looses
its value when used in subroutine call
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: baradi09 at gmail dot com
Created attachment 33477
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33477&action=edit
Fortran source file demonstrating the erroneous behavior
Take a deferred length allocatable character component in a derived type. Pass
this to a subroutine, which expects an allocatable deferred length character as
argument. Whatever value is given to it within the subroutine, its value is
lost (empty string) when the program leaves the subroutine.
Attached example demonstrates that. While the first print statement within the
subroutine shows the correct string, the second one in the main program
indicates a character component which is allocated, but has the empty string as
content.
More information about the Gcc-bugs
mailing list