This is the mail archive of the 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]

Re: [Patch, fortran] PR20541 - allocatable components (TR15541)

On Fri, Oct 06, 2006 at 06:33:10AM +0200, Paul Thomas wrote:
> Tobias,
> >
> >Out of curiousity, why didn't you use alloca instead of doing all 
> >this  bookkeeping?  Maybe because you would have needed bookkeeping 
> >anyway  for the case where the allocatable component would have been 
> >>  -fmax-stack-var-size?  Or is there a simpler reason?
> Ignorance.
> Having looked at the spec. for alloca, you are right, we would have had 
> to branch for >  -fmax-stack-var-size; otherwise the warnings in the gcc 
> manual would hold good.  I will put a TODO in the code somewhere.
> It would simplify the code considerably - take a look for some of the 
> testcases!

How portable is alloca?  It's, as far as I know, not standard (neither
ANSI C nor POSIX).  It's possible that it, in practice, is supported
everywhere where gfortran is supposed to work, but, to quote the
man-page of the GNU implementation of alloca:

               The alloca function is machine and compiler dependent. On
               many systems its implementation is buggy. Its use is

vi vi vi - The Editor of the beast

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