Commit 7b25f6e5 by Jason Merrill Committed by Jason Merrill

re PR c++/12815 (Code compiled with optimization behaves unexpectedly)

        PR c++/12815
        * class.c (build_base_path): Do not mark vtable references as
        TREE_CONSTANT.
        (build_vtbl_ref_1): Likewise.

From-SVN: r75770
parent f92ed976
2004-01-12 Jason Merrill <jason@redhat.com>
PR c++/12815
* class.c (build_base_path): Do not mark vtable references as
TREE_CONSTANT.
(build_vtbl_ref_1): Likewise.
2004-01-12 Richard Henderson <rth@redhat.com>
PR opt/10776
......
......@@ -328,7 +328,6 @@ build_base_path (enum tree_code code,
build_pointer_type (ptrdiff_type_node),
v_offset);
v_offset = build_indirect_ref (v_offset, NULL);
TREE_CONSTANT (v_offset) = 1;
offset = convert_to_integer (ptrdiff_type_node,
size_diffop (offset,
......@@ -455,7 +454,6 @@ build_vtbl_ref_1 (tree instance, tree idx)
assemble_external (vtbl);
aref = build_array_ref (vtbl, idx);
TREE_CONSTANT (aref) |= TREE_CONSTANT (vtbl) && TREE_CONSTANT (idx);
return aref;
}
......
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