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/71880] New: pointer to allocatable character


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

            Bug ID: 71880
           Summary: pointer to allocatable character
           Product: gcc
           Version: 6.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: valeryweber at hotmail dot com
  Target Milestone: ---

Hi All
is that a compiler bug?
many thanks
v

cat gcc-6.1.f90 
program t
character(:), dimension(:), allocatable, target :: c
character(:), dimension(:), pointer :: p
allocate(c(10),source='X')
p=>c
write(*,*) 'p=<',p(1),'> c=<',c(1),'>',len(p(1))
end program t

gfortran-6.1.0 gcc-6.1.f90 
./a.out 
 p=<> c=<X>           0

gfortran-trunk gcc-6.1.f90 
./a.out 
 p=<> c=<X>           0

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