* tree.c (build1): Don't set TREE_READONLY on INDIRECT_REF.
PR c++/3331
* cp/init.c (resolve_offset_ref): Use build_indirect_ref.
From-SVN: r49132
2002-01-23 Jason Merrill <jason@redhat.com>
+ * tree.c (build1): Don't set TREE_READONLY on INDIRECT_REF.
+
* function.c (assign_parms): Don't put args of inline functions
into registers when not optimizing.
-2002-01-22 Jason Merrill <jason@redhat.com>
+2002-01-23 Jason Merrill <jason@redhat.com>
+
+ PR c++/3331
+ * init.c (resolve_offset_ref): Use build_indirect_ref.
* decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
+2002-01-22 Jason Merrill <jason@redhat.com>
+
* parse.y (function_body): Suppress the block for the outermost
curly braces.
* decl.c (pushdecl): Don't try to skip it.
member = cp_convert (ptrdiff_type_node, member);
- return build1 (INDIRECT_REF, type,
- build (PLUS_EXPR, build_pointer_type (type),
- addr, member));
+ addr = build (PLUS_EXPR, build_pointer_type (type), addr, member);
+ return build_indirect_ref (addr, 0);
}
else if (TYPE_PTRMEMFUNC_P (TREE_TYPE (member)))
{
TREE_READONLY (t) = 0;
break;
+ case INDIRECT_REF:
+ /* Whether a dereference is readonly has nothing to do with whether
+ its operand is readonly. */
+ TREE_READONLY (t) = 0;
+ break;
+
default:
if (TREE_CODE_CLASS (code) == '1' && node && TREE_CONSTANT (node))
TREE_CONSTANT (t) = 1;