This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Initialize void_list_node
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Tue, 11 Oct 2005 17:21:53 -0400
- Subject: [PATCH] Initialize void_list_node
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
Noticed while looking at assembly generated by f951.
Unlike C/C++/ObjC/ObjC++/Java/..., Fortran doesn't initialize
void_list_node, but uses it to create prototypes of various builtins.
The result is that all such builtins are considered to have ...
at the end of arguments, and on e.g. x86_64 that means %rax needs
to be initialized before every such a call. It also means that many
builtins can't be optimized. Consider say:
double precision d
d = 6.1
d = aint (d)
write (*, '(f8.2)') d
end
Is this ok for HEAD or just gomp?
Regtested on x86_64-linux.
2005-10-11 Jakub Jelinek <jakub@redhat.com>
* f95-lang.c (gfc_init_decl_processing): Initialize
void_list_node.
--- gcc/fortran/f95-lang.c.jj 2005-10-11 17:27:21.000000000 +0200
+++ gcc/fortran/f95-lang.c 2005-10-11 22:39:18.000000000 +0200
@@ -598,6 +598,7 @@ gfc_init_decl_processing (void)
build_common_tree_nodes (false, false);
set_sizetype (long_unsigned_type_node);
build_common_tree_nodes_2 (0);
+ void_list_node = build_tree_list (NULL_TREE, void_type_node);
/* Set up F95 type nodes. */
gfc_init_kinds ();
Jakub