aboutsummaryrefslogtreecommitdiff
path: root/gcc/go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2012-09-22 06:33:10 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-09-22 06:33:10 +0000
commitd47cbb6dd43e5cd02d107f336cbd9554c62acd80 (patch)
treec45899971de19ce4a19f519770e568099f6a41c6 /gcc/go
parent2afc1e0b30efd4b6460a42e692314a82832676bd (diff)
downloadgcc-d47cbb6dd43e5cd02d107f336cbd9554c62acd80.zip
gcc-d47cbb6dd43e5cd02d107f336cbd9554c62acd80.tar.gz
gcc-d47cbb6dd43e5cd02d107f336cbd9554c62acd80.tar.bz2
compiler: No error if shift operand inherits interface type.
From-SVN: r191634
Diffstat (limited to 'gcc/go')
-rw-r--r--gcc/go/gofrontend/expressions.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc
index b99dc5c..eef7ea7 100644
--- a/gcc/go/gofrontend/expressions.cc
+++ b/gcc/go/gofrontend/expressions.cc
@@ -5453,7 +5453,8 @@ Binary_expression::do_determine_type(const Type_context* context)
&& (this->left_->type()->integer_type() == NULL
|| (subcontext.type->integer_type() == NULL
&& subcontext.type->float_type() == NULL
- && subcontext.type->complex_type() == NULL)))
+ && subcontext.type->complex_type() == NULL
+ && subcontext.type->interface_type() == NULL)))
this->report_error(("invalid context-determined non-integer type "
"for shift operand"));