go-lang.c (TARGET_AIX): Define if not defined.
authorTony Reix <tony.reix@atos.net>
Tue, 12 Dec 2017 17:29:27 +0000 (17:29 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 12 Dec 2017 17:29:27 +0000 (17:29 +0000)
* go-lang.c (TARGET_AIX): Define if not defined.
(go_langhook_init): Set nil_check_size_threshold to -1 on AIX.

Co-Authored-By: Ian Lance Taylor <iant@golang.org>
From-SVN: r255582

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

index 0310061..a829159 100644 (file)
@@ -1,3 +1,9 @@
+2017-12-12  Tony Reix  <tony.reix@atos.net>
+           Ian Lance Taylor  <iant@golang.org>
+
+       * go-lang.c (TARGET_AIX): Define if not defined.
+       (go_langhook_init): Set nil_check_size_threshold to -1 on AIX.
+
 2017-12-01  Ian Lance Taylor  <iant@golang.org>
 
        * go-gcc.cc (Gcc_backend::Gcc_backend): Define
index fda069a..8e660a6 100644 (file)
@@ -39,6 +39,10 @@ along with GCC; see the file COPYING3.  If not see
 #include "go-c.h"
 #include "go-gcc.h"
 
+#ifndef TARGET_AIX
+#define TARGET_AIX 0
+#endif
+
 /* Language-dependent contents of a type.  */
 
 struct GTY(()) lang_type
@@ -112,7 +116,7 @@ go_langhook_init (void)
   args.check_divide_overflow = go_check_divide_overflow;
   args.compiling_runtime = go_compiling_runtime;
   args.debug_escape_level = go_debug_escape_level;
-  args.nil_check_size_threshold = 4096;
+  args.nil_check_size_threshold = TARGET_AIX ? -1 : 4096;
   args.linemap = go_get_linemap();
   args.backend = go_get_backend();
   go_create_gogo (&args);