projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e03217
)
Don't crash on reference to field with erroneous type.
author
Ian Lance Taylor
<ian@gcc.gnu.org>
Wed, 19 Jan 2011 20:47:21 +0000
(20:47 +0000)
committer
Ian Lance Taylor
<ian@gcc.gnu.org>
Wed, 19 Jan 2011 20:47:21 +0000
(20:47 +0000)
From-SVN: r169027
gcc/go/gofrontend/expressions.cc
patch
|
blob
|
history
diff --git
a/gcc/go/gofrontend/expressions.cc
b/gcc/go/gofrontend/expressions.cc
index
2171564
..
6fa1b99
100644
(file)
--- a/
gcc/go/gofrontend/expressions.cc
+++ b/
gcc/go/gofrontend/expressions.cc
@@
-9988,6
+9988,8
@@
Field_reference_expression::do_get_tree(Translate_context* context)
field = DECL_CHAIN(field);
gcc_assert(field != NULL_TREE);
}
+ if (TREE_TYPE(field) == error_mark_node)
+ return error_mark_node;
return build3(COMPONENT_REF, TREE_TYPE(field), struct_tree, field,
NULL_TREE);
}