This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Initialize void_list_node


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]