public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/63932] New: posible problem with allocatable character(:)
@ 2014-11-18 11:27 valeryweber at hotmail dot com
2014-11-30 11:43 ` [Bug fortran/63932] " dominiq at lps dot ens.fr
0 siblings, 1 reply; 2+ messages in thread
From: valeryweber at hotmail dot com @ 2014-11-18 11:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63932
Bug ID: 63932
Summary: posible problem with allocatable character(:)
Product: gcc
Version: 4.9.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: valeryweber at hotmail dot com
Dear All
the following code seems to produce the wrong result with 4.9.2.
thanks
v
cat test.f90
module mod
type :: t
character(:), allocatable :: c
integer :: i
contains
procedure, pass :: get
end type t
type :: u
character(:), allocatable :: c
end type u
contains
subroutine get(this, a)
class(t), intent(in) :: this
character(:), allocatable, intent(out), optional :: a
if(present(a)) a=this%c
end subroutine get
end module mod
program test
use mod
type(t) :: a
type(u) :: b
a%c='soemthing'
call a%get(a=b%c)
write(*,*) b%c
end program test
gfortran-4.9.2 test.f90
./a.out
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-30 11:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-18 11:27 [Bug fortran/63932] New: posible problem with allocatable character(:) valeryweber at hotmail dot com
2014-11-30 11:43 ` [Bug fortran/63932] " 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).