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

Re: Array bound checking in Fortran and its "abort" routine.


I wrote:

> However, s_rnge actually is an __attribute__ ((noreturn)) function,
> which, according to c-common.c (function decl_attributes) should have
> TREE_THIS_VOLATILE set (is that instead of or in addition to ?).

Well, it happens that TREE_THIS_VOLATILE _is_ already set for this (and
other non-returning) functions in com.c (function ffecom_make_gfrt_) -
this is driven by the com-rt.def definitions file.

Now see if I can pull the same trick for DECL_IS_PURE (true for most of
the math intrinsics in Fortran) ....

BTW, it seems to me that some fancy things follow from
TREE_THIS_VOLATILE:

Because the function is guaranteed not to return, any jump to it can be
predicted "never taken" (or, mutatis mutandis, any jump around it as
"always taken") by predict.c.

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://g95.sourceforge.net/ (under construction)

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