Re: [PATCH, PR fortran/45170] -- properly translates substring reference

2011-08-30 Thread Steve Kargl
On Sun, Aug 28, 2011 at 11:36:42PM +0200, Mikael Morin wrote: > On Saturday 27 August 2011 02:34:24 Steve Kargl wrote: > > The attached patch allows gfortran to compile the > > attached testcase. The resulting executable runs > > as expected. > > > > Short story: > > > > character(len=20) :: s

Re: [PATCH, PR fortran/45170] -- properly translates substring reference

2011-08-28 Thread Mikael Morin
On Saturday 27 August 2011 02:34:24 Steve Kargl wrote: > The attached patch allows gfortran to compile the > attached testcase. The resulting executable runs > as expected. > > Short story: > > character(len=20) :: string = 'some text here' > character(len=:), allocatable :: s > n = 5 >

[PATCH, PR fortran/45170] -- properly translates substring reference

2011-08-26 Thread Steve Kargl
The attached patch allows gfortran to compile the attached testcase. The resulting executable runs as expected. Short story: character(len=20) :: string = 'some text here' character(len=:), allocatable :: s n = 5 allocate(s, source=string(:n)) The length of s is determined from the ex