aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/class.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r--gcc/cp/class.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 40e6d3e..286164d 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -3779,7 +3779,9 @@ walk_subobject_offsets (tree type,
/* Iterate through the fields of TYPE. */
for (field = TYPE_FIELDS (type); field; field = DECL_CHAIN (field))
- if (TREE_CODE (field) == FIELD_DECL && !DECL_ARTIFICIAL (field))
+ if (TREE_CODE (field) == FIELD_DECL
+ && TREE_TYPE (field) != error_mark_node
+ && !DECL_ARTIFICIAL (field))
{
tree field_offset;