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: [gfortran] Patch for PR 17590: Tagging intrinsics with standard version


On Sunday 31 October 2004 19:18, Janne Blomqvist wrote:
> On Sun, Oct 31, 2004 at 10:21:51AM -0500, Andrew Pinski wrote:
> > On Oct 31, 2004, at 10:18 AM, Janne Blomqvist wrote:
> > >ChangeLog:
> > >
> > > PR fortran/17590
> > >
> > > * intrinsic.c (check_intrinsic_standard): Use __builtin_alloca to
> > > allocate message string on the stack.
> >
> > Can you just use alloca instead of __builtin_alloca?  Inside the
> > compiler, alloca does the right thing.
>
> I don't know. I remember __builtin_alloca from some discussion where
> it was claimed that alloca was buggy on some platforms and that
> __builtin_alloca would get around that. But that discussion was
> related to the library, so I guess you're right..

That was for the runtime library.

For target library code (ie. libgfortran) we know the compiler is gcc, so can 
use __builtin_alloca. This is also built for a wider range of targets than 
the compiler itself.

For the compiler itself we have more extensive/well tested configure support, 
so alloca should always work. Because fortran isn't a stage1 boostrap 
language we technically only need to be compiled by gcc 2.95 or later (when 
cross-compiling). Use of gcc extensions tends to be discouraged though, and 
the source should be compilable by a C89 compiler unless there is a good 
reason.

Paul


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