diff options
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r-- | gcc/cp/class.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 65e7144..6b76bf7 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -291,7 +291,8 @@ build_base_path (enum tree_code code, target_type = code == PLUS_EXPR ? BINFO_TYPE (binfo) : BINFO_TYPE (d_binfo); /* Do we need to look in the vtable for the real offset? */ - virtual_access = (v_binfo && fixed_type_p <= 0); + /* Don't bother inside sizeof; the source type might not be complete. */ + virtual_access = (v_binfo && fixed_type_p <= 0) && !skip_evaluation; /* Do we need to check for a null pointer? */ if (want_pointer && !nonnull) |