Comments

Hi!
Given that some people apparently compile Fortran code with -fexceptions,
it is desirable to pay little bit more attention to TREE_NOTHROW.
This patch adds it to a bunch of functions that clearly can't ever throw.
The criteria I was using is that it doesn't call any of the IO functions
(including os_error and similar, so that rules also libgfortran memory
allocations) nor any other function which might throw e.g. on
pthread_cancel. Calls to memcpy/memset/strcmp/strncasecmp etc. are
ok. One of the routines actually has assert in it, but it is quite obvious
when reading the source that the assert can never trigger.
Also, I've noticed that ishftc{4,8,16} are actually constant functions too,
so it adds TREE_READONLY for those 3 as well.
Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
2010-08-20 Jakub Jelinek <jakub@redhat.com>
* trans-decl.c (gfc_build_intrinsic_function_decls): Set
TREE_NOTHROW on fndecls that can't throw. Set
TREE_READONLY on gfor_fndecl_math_ishftc{4,8,16}.
(gfc_build_builtin_function_decls): Set TREE_NOTHROW on
gfor_fndecl_associated.
Jakub