diff options
Diffstat (limited to 'gcc/cp/expr.c')
-rw-r--r-- | gcc/cp/expr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/expr.c b/gcc/cp/expr.c index ffd18ca6785..f15b049baf8 100644 --- a/gcc/cp/expr.c +++ b/gcc/cp/expr.c @@ -43,6 +43,10 @@ cplus_expand_constant (tree cst) /* Find the member. */ member = PTRMEM_CST_MEMBER (cst); + /* We can't lower this until the class is complete. */ + if (!COMPLETE_TYPE_P (DECL_CONTEXT (member))) + return cst; + if (TREE_CODE (member) == FIELD_DECL) { /* Find the offset for the field. */ |