+2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR c++/3543
+ * typeck.c (condition_conversion): Resolve an OFFSET_REF.
+ * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
+
2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
* class.c (build_vtbl_or_vbase_field): Remove, move into ...
target, tmode, modifier);
case OFFSET_REF:
- return expand_expr (default_conversion (resolve_offset_ref (exp)),
- target, tmode, EXPAND_NORMAL);
-
+ /* Offset refs should not make it through to here. */
+ my_friendly_abort (20010724);
+ return const0_rtx;
+
case THROW_EXPR:
expand_expr (TREE_OPERAND (exp, 0), const0_rtx, VOIDmode, 0);
return NULL;
tree t;
if (processing_template_decl)
return expr;
+ if (TREE_CODE (expr) == OFFSET_REF)
+ expr = resolve_offset_ref (expr);
t = perform_implicit_conversion (boolean_type_node, expr);
t = fold (build1 (CLEANUP_POINT_EXPR, boolean_type_node, t));
return t;
+2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
+
+ * g++.old-deja/g++.other/optimize4.C: New test.
+
2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
* g++.old-deja/g++.abi/vbase8-5.C: New test.
--- /dev/null
+// Build don't link:
+//
+// Copyright (C) 2001 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 24 Jul 2001 <nathan@codesourcery.com>
+
+// Bug 3543. We forgot to resolve an OFFSET_REF
+
+
+struct Writeable {
+ bool blocking_mode;
+};
+
+
+struct Pipe : Writeable {
+ void ewrite();
+
+ void set_write_blocking ()
+ {
+ if (Writeable::blocking_mode);
+ }
+};
+
+void Pipe::ewrite()
+{
+ set_write_blocking();
+}
+
+void ewrite(Pipe &p)
+{
+ p.set_write_blocking();
+}