aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorSteven Bosscher <stevenb@suse.de>2005-07-31 21:41:39 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2005-07-31 21:41:39 +0000
commit16275f18ffb2ebbffad5474aa14d4e170acdd1f5 (patch)
tree94fc3d9b5fbc3b7a4914971c3f8b8ec59a0c7739 /gcc/fortran
parentbaf7a0d33c7820b048fffe2da276748d5ecbcce9 (diff)
downloadgcc-16275f18ffb2ebbffad5474aa14d4e170acdd1f5.zip
gcc-16275f18ffb2ebbffad5474aa14d4e170acdd1f5.tar.gz
gcc-16275f18ffb2ebbffad5474aa14d4e170acdd1f5.tar.bz2
trans-decl.c (gfc_build_builtin_function_decls): Give the internal malloc functions the 'malloc' attribute.
* trans-decl.c (gfc_build_builtin_function_decls): Give the internal malloc functions the 'malloc' attribute. Give runtime_error the 'noreturn' attribute. From-SVN: r102609
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/trans-decl.c5
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index f64e743..2704eec 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,5 +1,11 @@
2005-07-31 Steven Bosscher <stevenb@suse.de>
+ * trans-decl.c (gfc_build_builtin_function_decls): Give the internal
+ malloc functions the 'malloc' attribute. Give runtime_error the
+ 'noreturn' attribute.
+
+2005-07-31 Steven Bosscher <stevenb@suse.de>
+
* trans-stmt.c (gfc_trans_goto): Jump to the known label instead
of the assigned goto variable.
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index ad53cbd..3395f3e 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -1874,14 +1874,17 @@ gfc_build_builtin_function_decls (void)
tree gfc_logical4_type_node = gfc_get_logical_type (4);
tree gfc_pint4_type_node = build_pointer_type (gfc_int4_type_node);
+ /* Treat these two internal malloc wrappers as malloc. */
gfor_fndecl_internal_malloc =
gfc_build_library_function_decl (get_identifier (PREFIX("internal_malloc")),
pvoid_type_node, 1, gfc_int4_type_node);
+ DECL_IS_MALLOC (gfor_fndecl_internal_malloc) = 1;
gfor_fndecl_internal_malloc64 =
gfc_build_library_function_decl (get_identifier
(PREFIX("internal_malloc64")),
pvoid_type_node, 1, gfc_int8_type_node);
+ DECL_IS_MALLOC (gfor_fndecl_internal_malloc64) = 1;
gfor_fndecl_internal_free =
gfc_build_library_function_decl (get_identifier (PREFIX("internal_free")),
@@ -1930,6 +1933,8 @@ gfc_build_builtin_function_decls (void)
3,
pchar_type_node, pchar_type_node,
gfc_int4_type_node);
+ /* The runtime_error function does not return. */
+ TREE_THIS_VOLATILE (gfor_fndecl_runtime_error) = 1;
gfor_fndecl_in_pack = gfc_build_library_function_decl (
get_identifier (PREFIX("internal_pack")),