Commit 7a0b47e3 by Jason Merrill Committed by Jason Merrill

re PR c++/27177 (ICE in build_simple_base_path, at cp/class.c:474)

        PR c++/27177
        * class.c (build_base_path): Fix previous change.

From-SVN: r131899
parent ba54d89d
2008-01-27 Jason Merrill <jason@redhat.com>
PR c++/27177
* class.c (build_base_path): Fix previous change.
2008-01-26 Jakub Jelinek <jakub@redhat.com> 2008-01-26 Jakub Jelinek <jakub@redhat.com>
PR c++/34965 PR c++/34965
......
...@@ -291,8 +291,12 @@ build_base_path (enum tree_code code, ...@@ -291,8 +291,12 @@ build_base_path (enum tree_code code,
target_type = code == PLUS_EXPR ? BINFO_TYPE (binfo) : BINFO_TYPE (d_binfo); target_type = code == PLUS_EXPR ? BINFO_TYPE (binfo) : BINFO_TYPE (d_binfo);
/* Do we need to look in the vtable for the real offset? */ /* Do we need to look in the vtable for the real offset? */
/* Don't bother inside sizeof; the source type might not be complete. */ virtual_access = (v_binfo && fixed_type_p <= 0);
virtual_access = (v_binfo && fixed_type_p <= 0) && !skip_evaluation;
/* Don't bother with the calculations inside sizeof; they'll ICE if the
source type is incomplete and the pointer value doesn't matter. */
if (skip_evaluation)
return build_nop (build_pointer_type (target_type), expr);
/* Do we need to check for a null pointer? */ /* Do we need to check for a null pointer? */
if (want_pointer && !nonnull) if (want_pointer && !nonnull)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment