go-lang.c (go_langhook_init): Initialize void_list_node before calling go_create_gogo.
authorIan Lance Taylor <iant@google.com>
Thu, 12 Jan 2012 01:33:44 +0000 (01:33 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Thu, 12 Jan 2012 01:33:44 +0000 (01:33 +0000)
* go-lang.c (go_langhook_init): Initialize void_list_node before
calling go_create_gogo.

From-SVN: r183119

gcc/go/ChangeLog
gcc/go/go-lang.c

index 20675583b781cd6e8eb5c3088ba2ea0d1083af19..a0962b71cbc16522d249638033272278d707adb5 100644 (file)
@@ -1,3 +1,8 @@
+2012-01-11  Ian Lance Taylor  <iant@google.com>
+
+       * go-lang.c (go_langhook_init): Initialize void_list_node before
+       calling go_create_gogo.
+
 2012-01-10  Ian Lance Taylor  <iant@google.com>
 
        * go-gcc.cc (Gcc_backend::type_size): New function.
index 7d2de4417d5b6b658c2c6b1dee6e0686e8f8794c..9fa5c453955b3a511266ed9b3133b4ad61242b99 100644 (file)
@@ -88,6 +88,9 @@ go_langhook_init (void)
 {
   build_common_tree_nodes (false, false);
 
+  /* I don't know why this has to be done explicitly.  */
+  void_list_node = build_tree_list (NULL_TREE, void_type_node);
+
   /* We must create the gogo IR after calling build_common_tree_nodes
      (because Gogo::define_builtin_function_trees refers indirectly
      to, e.g., unsigned_char_type_node) but before calling
@@ -97,9 +100,6 @@ go_langhook_init (void)
 
   build_common_builtin_nodes ();
 
-  /* I don't know why this is not done by any of the above.  */
-  void_list_node = build_tree_list (NULL_TREE, void_type_node);
-
   /* The default precision for floating point numbers.  This is used
      for floating point constants with abstract type.  This may
      eventually be controllable by a command line option.  */