aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/gogo-tree.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2012-11-01 03:02:13 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-11-01 03:02:13 +0000
commit776f27a67f26c795ba8c27a4e69525382b9379c3 (patch)
tree0285cca6b375a23d93c20efec03cb9adec30f0e0 /gcc/go/gofrontend/gogo-tree.cc
parent79e0221796bf5897204e8077afc20e34f88dab3b (diff)
downloadgcc-776f27a67f26c795ba8c27a4e69525382b9379c3.zip
gcc-776f27a67f26c795ba8c27a4e69525382b9379c3.tar.gz
gcc-776f27a67f26c795ba8c27a4e69525382b9379c3.tar.bz2
compiler, runtime: More steps toward separating int and intgo.
From-SVN: r193059
Diffstat (limited to 'gcc/go/gofrontend/gogo-tree.cc')
-rw-r--r--gcc/go/gofrontend/gogo-tree.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/go/gofrontend/gogo-tree.cc b/gcc/go/gofrontend/gogo-tree.cc
index 0d1746f..2b0c26f 100644
--- a/gcc/go/gofrontend/gogo-tree.cc
+++ b/gcc/go/gofrontend/gogo-tree.cc
@@ -2331,14 +2331,17 @@ Gogo::call_builtin(tree* pdecl, Location location, const char* name,
tree
Gogo::runtime_error(int code, Location location)
{
+ Type* int32_type = Type::lookup_integer_type("int32");
+ tree int32_type_tree = type_to_tree(int32_type->get_backend(this));
+
static tree runtime_error_fndecl;
tree ret = Gogo::call_builtin(&runtime_error_fndecl,
location,
"__go_runtime_error",
1,
void_type_node,
- integer_type_node,
- build_int_cst(integer_type_node, code));
+ int32_type_tree,
+ build_int_cst(int32_type_tree, code));
if (ret == error_mark_node)
return error_mark_node;
// The runtime error function panics and does not return.