aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/go-lang.c
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2012-01-12 01:33:44 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-01-12 01:33:44 +0000
commit00733a00417dbd433152c3ceaadd78a6edf77730 (patch)
treee7bc2b2ec249a4df5ffd5afa764f75c51d158123 /gcc/go/go-lang.c
parent9a0e3259f44ad2de9c65f14f756dab01b3598391 (diff)
downloadgcc-00733a00417dbd433152c3ceaadd78a6edf77730.zip
gcc-00733a00417dbd433152c3ceaadd78a6edf77730.tar.gz
gcc-00733a00417dbd433152c3ceaadd78a6edf77730.tar.bz2
go-lang.c (go_langhook_init): Initialize void_list_node before calling go_create_gogo.
* go-lang.c (go_langhook_init): Initialize void_list_node before calling go_create_gogo. From-SVN: r183119
Diffstat (limited to 'gcc/go/go-lang.c')
-rw-r--r--gcc/go/go-lang.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/go/go-lang.c b/gcc/go/go-lang.c
index 7d2de44..9fa5c45 100644
--- a/gcc/go/go-lang.c
+++ b/gcc/go/go-lang.c
@@ -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. */