public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/63232] New: Deferred length character field of derived type looses its value when used in subroutine call
@ 2014-09-11 21:13 baradi09 at gmail dot com
  2014-09-11 23:27 ` [Bug fortran/63232] " dominiq at lps dot ens.fr
  0 siblings, 1 reply; 2+ messages in thread
From: baradi09 at gmail dot com @ 2014-09-11 21:13 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug fortran/63232] Deferred length character field of derived type looses its value when used in subroutine call
  2014-09-11 21:13 [Bug fortran/63232] New: Deferred length character field of derived type looses its value when used in subroutine call baradi09 at gmail dot com
@ 2014-09-11 23:27 ` dominiq at lps dot ens.fr
  0 siblings, 0 replies; 2+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-09-11 23:27 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-09-11
     Ever confirmed|0                           |1

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Confirmed on 4.9.1 and trunk (5.0).


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-11 23:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-11 21:13 [Bug fortran/63232] New: Deferred length character field of derived type looses its value when used in subroutine call baradi09 at gmail dot com
2014-09-11 23:27 ` [Bug fortran/63232] " dominiq at lps dot ens.fr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).