aboutsummaryrefslogtreecommitdiff
path: root/gcc/go
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/go')
-rw-r--r--gcc/go/gofrontend/runtime.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/runtime.cc b/gcc/go/gofrontend/runtime.cc
index 514c045..3cc5ded 100644
--- a/gcc/go/gofrontend/runtime.cc
+++ b/gcc/go/gofrontend/runtime.cc
@@ -463,7 +463,7 @@ Runtime::name_to_code(const std::string& name)
// The names in the table have "runtime." prefix. We may be
// called with a name without the prefix. Try matching
// without the prefix as well.
- if (startswith(runtime_function_name, "runtime.")
+ if (strncmp(runtime_function_name, "runtime.", 8) == 0
&& strcmp(runtime_function_name + 8, name.c_str()) == 0)
code = static_cast<Runtime::Function>(i);
}