This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Array bound checking in Fortran and its "abort" routine.
- To: gcc at gcc dot gnu dot org
- Subject: Array bound checking in Fortran and its "abort" routine.
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Date: Tue, 11 Jul 2000 13:54:45 +0200
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
L.S.,
While trying to assess the opportunities of Value Range Propagation for
simplifying Fortran array bound checking, I came across the following:
In f/com.c (function ffecom_subscript_check_) the call to `s_rnge' which
is the "fancy_abort" routine for array bounds violation is coded as
follows:
die = ffecom_call_gfrt (FFECOM_gfrtRANGE,
args, NULL_TREE);
TREE_SIDE_EFFECTS (die) = 1;
Craig probably set TREE_SIDE_EFFECTS because that's the normal thing to
do with functions (see tree.h).
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 ?).
Should I change the Fortran frontend accordingly ? Or doesn't it make a
lot of difference ?
Thanks in advance,
--
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)