aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/expressions.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/go/gofrontend/expressions.cc')
-rw-r--r--gcc/go/gofrontend/expressions.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc
index 247ae1b..71838b1 100644
--- a/gcc/go/gofrontend/expressions.cc
+++ b/gcc/go/gofrontend/expressions.cc
@@ -4092,6 +4092,9 @@ Type_conversion_expression::do_numeric_constant_value(
bool
Type_conversion_expression::do_string_constant_value(std::string* val) const
{
+ if (this->type_->is_string_type() && this->expr_->type()->is_string_type())
+ return this->expr_->string_constant_value(val);
+
if (this->type_->is_string_type()
&& this->expr_->type()->integer_type() != NULL)
{