diff options
author | Jason Merrill <jason@redhat.com> | 2008-01-25 19:41:49 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2008-01-25 19:41:49 -0500 |
commit | d79ca2074fdb83ace6f79ccf3530285d8b15be8c (patch) | |
tree | ddf28327844fe897e52b8135386d72bfd91b85c7 /gcc/cp/class.c | |
parent | 31bc8a984f0a7a4c9f88cbee956a85ecd1b5ba97 (diff) | |
download | gcc-d79ca2074fdb83ace6f79ccf3530285d8b15be8c.zip gcc-d79ca2074fdb83ace6f79ccf3530285d8b15be8c.tar.gz gcc-d79ca2074fdb83ace6f79ccf3530285d8b15be8c.tar.bz2 |
re PR c++/27177 (ICE in build_simple_base_path, at cp/class.c:474)
PR c++/27177
* class.c (build_base_path): Don't mess with virtual access if
skip_evaluation.
* call.c (standard_conversion): Don't check whether source type
is complete.
From-SVN: r131855
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) |