From: ian Date: Thu, 12 Jan 2012 01:33:44 +0000 (+0000) Subject: * go-lang.c (go_langhook_init): Initialize void_list_node before X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=e5287e211aa67705637033a60b99ecd6b2614c6f * go-lang.c (go_langhook_init): Initialize void_list_node before calling go_create_gogo. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183119 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog index 20675583b78..a0962b71cbc 100644 --- a/gcc/go/ChangeLog +++ b/gcc/go/ChangeLog @@ -1,3 +1,8 @@ +2012-01-11 Ian Lance Taylor + + * go-lang.c (go_langhook_init): Initialize void_list_node before + calling go_create_gogo. + 2012-01-10 Ian Lance Taylor * go-gcc.cc (Gcc_backend::type_size): New function. diff --git a/gcc/go/go-lang.c b/gcc/go/go-lang.c index 7d2de4417d5..9fa5c453955 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. */