[PATCH] Initialize void_list_node
Steven Bosscher
stevenb@suse.de
Tue Oct 11 22:25:00 GMT 2005
Hi Jakubm
If this node is necessary for the builtins, why don't you let it be
built in
build_common_tree_nodes or build_common_tree_nodes_2?
Gr.
Steven
On Oct 11, 2005 11:21 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> 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
Steven Bosscher
SUSE Labs
More information about the Fortran
mailing list