summaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-28 16:34:36 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-28 16:34:36 +0000
commit4a68fd3cf82cde5dbdbfed957eac66f9f78820ea (patch)
treedf17a1c6a564a87e23e89f03d7cabc50414014c4 /gcc/fortran
parent83f4b93be171071920df6321140d217239f7c23e (diff)
downloadgcc-4a68fd3cf82cde5dbdbfed957eac66f9f78820ea.tar.gz
* builtin-attrs.def (ATTR_LEAF): New attribute.
(ATTR_NOVOPS_LEAF_LIST, ATTR_LEAF_LIST, ATTR_NOTHROW_LEAF_LIST, ATTR_CONST_NOTHROW_LEAF_LIST, ATTR_PURE_NOTHROW_LEAF_LIST, ATTR_PURE_NOTHROW_NOVOPS_LEAF_LIST, ATTR_NORETURN_NOTHROW_LEAF_LIST, ATTR_MALLOC_NOTHROW_LEAF_LIST, ATTR_SENTINEL_NOTHROW_LEAF_LIST, ATTR_NOTHROW_NONNULL_LEAF, ATTR_CONST_NOTHROW_NONNULL_LEAF, ATTR_CONST_NOTHROW_TYPEGENERIC_LEAF, ATTR_PURE_NOTHROW_NONNULL_LEAF, ATTR_MALLOC_NOTHROW_NONNULL_LEAF): New attribute lists. * sync-builtins.def: Annotate all builtins by leaf. * omp-builtins.def: Annotate all builtins by leaf. * builtins.def: Annotate relevant builtins with leaf attribute. (ATTR_MATHFN_ERRNO, ATTR_MATHFN_FPROUNDING, ATTR_MATHFN_FPROUNDING_ERRNO, ATTR_MATHFN_FPROUNDING_STORE): Make leaf. * gcc-interface/utils.c (handle_leaf_attribute): New function. (gnat_internal_attribute_tables): Add leaf. * lto-lang.c (handle_leaf_attribute): New function. (lto_attribute_tables): Add leaf. * f95-lang.c (gfc_define_builtin): Make leaf. (gfc_init_builtin_functions): Handle only ATTR_CONST_NOTHROW_LEAF_LIST and ATTR_NOTHROW_LEAF_LIST. (DEF_SYNC_BUILTIN): Check ATTR_CONST_NOTHROW_LEAF_LIST. (DEF_GOMP_BUILTIN): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164689 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog8
-rw-r--r--gcc/fortran/f95-lang.c10
2 files changed, 14 insertions, 4 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 54687eee28d..138f458269a 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,11 @@
+2010-09-28 Jan Hubicka <jh@suse.cz>
+
+ * f95-lang.c (gfc_define_builtin): Make leaf.
+ (gfc_init_builtin_functions): Handle only ATTR_CONST_NOTHROW_LEAF_LIST
+ and ATTR_NOTHROW_LEAF_LIST.
+ (DEF_SYNC_BUILTIN): Check ATTR_CONST_NOTHROW_LEAF_LIST.
+ (DEF_GOMP_BUILTIN): Likewise.
+
2010-09-28 Tobias Burnus <burnus@net-b.de>
PR fortran/45756
diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c
index d00b7f0df50..dc678477e4d 100644
--- a/gcc/fortran/f95-lang.c
+++ b/gcc/fortran/f95-lang.c
@@ -638,6 +638,8 @@ gfc_define_builtin (const char *name,
if (const_p)
TREE_READONLY (decl) = 1;
TREE_NOTHROW (decl) = 1;
+ DECL_ATTRIBUTES (decl) = tree_cons (get_identifier ("leaf"),
+ NULL, DECL_ATTRIBUTES (decl));
built_in_decls[code] = decl;
implicit_built_in_decls[code] = decl;
@@ -728,8 +730,8 @@ gfc_init_builtin_functions (void)
enum
{
/* So far we need just these 2 attribute types. */
- ATTR_NOTHROW_LIST,
- ATTR_CONST_NOTHROW_LIST
+ ATTR_NOTHROW_LEAF_LIST,
+ ATTR_CONST_NOTHROW_LEAF_LIST
};
tree mfunc_float[6];
@@ -1083,7 +1085,7 @@ gfc_init_builtin_functions (void)
#undef DEF_SYNC_BUILTIN
#define DEF_SYNC_BUILTIN(code, name, type, attr) \
gfc_define_builtin (name, builtin_types[type], code, name, \
- attr == ATTR_CONST_NOTHROW_LIST);
+ attr == ATTR_CONST_NOTHROW_LEAF_LIST);
#include "../sync-builtins.def"
#undef DEF_SYNC_BUILTIN
@@ -1092,7 +1094,7 @@ gfc_init_builtin_functions (void)
#undef DEF_GOMP_BUILTIN
#define DEF_GOMP_BUILTIN(code, name, type, attr) \
gfc_define_builtin ("__builtin_" name, builtin_types[type], \
- code, name, attr == ATTR_CONST_NOTHROW_LIST);
+ code, name, attr == ATTR_CONST_NOTHROW_LEAF_LIST);
#include "../omp-builtins.def"
#undef DEF_GOMP_BUILTIN
}