projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2a4eaec
)
Don't crash on variable initialization from erroneous receive.
author
Ian Lance Taylor
<ian@gcc.gnu.org>
Wed, 22 Dec 2010 16:37:58 +0000
(16:37 +0000)
committer
Ian Lance Taylor
<ian@gcc.gnu.org>
Wed, 22 Dec 2010 16:37:58 +0000
(16:37 +0000)
From-SVN: r168175
gcc/go/gofrontend/gogo.cc
patch
|
blob
|
history
diff --git
a/gcc/go/gofrontend/gogo.cc
b/gcc/go/gofrontend/gogo.cc
index be4de9ce097d561a69e38aa5221bb7c05b81de71..634eccdcc0657cadfcd6bd15a8eafbaf3f9563b6 100644
(file)
--- a/
gcc/go/gofrontend/gogo.cc
+++ b/
gcc/go/gofrontend/gogo.cc
@@
-3165,7
+3165,7
@@
Variable::type_from_tuple(Expression* expr, bool report_error) const
{
Expression* channel = expr->receive_expression()->channel();
Type* channel_type = channel->type();
- if (channel_type->
is_error_type()
)
+ if (channel_type->
channel_type() == NULL
)
return Type::make_error_type();
return channel_type->channel_type()->element_type();
}