projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
10d53f5
)
Don't crash if named constant has no type when converting to GENERIC.
author
Ian Lance Taylor
<ian@gcc.gnu.org>
Tue, 4 Jan 2011 20:18:31 +0000
(20:18 +0000)
committer
Ian Lance Taylor
<ian@gcc.gnu.org>
Tue, 4 Jan 2011 20:18:31 +0000
(20:18 +0000)
From-SVN: r168483
gcc/go/gofrontend/expressions.cc
patch
|
blob
|
history
diff --git
a/gcc/go/gofrontend/expressions.cc
b/gcc/go/gofrontend/expressions.cc
index 013adacebcf20ec81e9a716d8084a3089566c21d..840fdb37d10604b1683956da54a0c23e3ac29f5f 100644
(file)
--- a/
gcc/go/gofrontend/expressions.cc
+++ b/
gcc/go/gofrontend/expressions.cc
@@
-2680,7
+2680,8
@@
Const_expression::do_get_tree(Translate_context* context)
// object is an abstract int or float, we try to get the abstract
// value. Otherwise we may lose something in the conversion.
if (this->type_ != NULL
- && this->constant_->const_value()->type()->is_abstract())
+ && (this->constant_->const_value()->type() == NULL
+ || this->constant_->const_value()->type()->is_abstract()))
{
Expression* expr = this->constant_->const_value()->expr();
mpz_t ival;