projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d61c69
)
Don't crash on Sizeof of bad type.
author
Ian Lance Taylor
<ian@gcc.gnu.org>
Wed, 23 Feb 2011 05:10:05 +0000
(
05:10
+0000)
committer
Ian Lance Taylor
<ian@gcc.gnu.org>
Wed, 23 Feb 2011 05:10:05 +0000
(
05:10
+0000)
From-SVN: r170430
gcc/go/gofrontend/expressions.cc
patch
|
blob
|
history
diff --git
a/gcc/go/gofrontend/expressions.cc
b/gcc/go/gofrontend/expressions.cc
index 050942c619c48133f7e01548228aa36d51f64abf..e9a26a0da0d832c9b2b8809ccdb6aa1f7fc3ddd2 100644
(file)
--- a/
gcc/go/gofrontend/expressions.cc
+++ b/
gcc/go/gofrontend/expressions.cc
@@
-7980,7
+7980,11
@@
Builtin_call_expression::do_get_tree(Translate_context* context)
mpz_init(val);
Type* dummy;
bool b = this->integer_constant_value(true, val, &dummy);
- gcc_assert(b);
+ if (!b)
+ {
+ gcc_assert(saw_errors());
+ return error_mark_node;
+ }
tree type = Type::lookup_integer_type("int")->get_tree(gogo);
tree ret = Expression::integer_constant_tree(val, type);
mpz_clear(val);