This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

Re: [Patch, fortran] PR18082 - gfortran gets stuck in loop with automatic length characters


On Sat, Oct 08, 2005 at 07:47:39AM +0200, Paul Thomas wrote:
> :ADDPATCH fortran:
> 
> This gets stuck in a loop whilst trying to treat the assignments:
> 
> subroutine snafu (i)
> character*(i) :: c1, c2
> c1 = ""
> c2 = ""
> end subroutine snafu
> 
> Declaring c1 and c2 in separate statements clears the problem.
> The reason for the problem is that both symbols get assigned the same 
> typespec in decl.c(variable_decl) and so the same character length and 
> corresponding backend declaration.   This is not good for automatic 
> character lengths.   The attached patch fixes this by doling out a new 
> typespec for all except constant expressions.

It seems that PR 21459 suffers from a very similar problem.  Do
you think it would be hard to extend your patch to fix that one
as well?


        Erik

PS. It's a rather impressive array of patches you have submitted
lately :-)


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