summaryrefslogtreecommitdiff
path: root/libstdc++-v3/libsupc++
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2003-01-28 15:26:53 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2003-01-28 15:26:53 +0000
commit26a0ed818440959d3dbd86bcf60bfb8e6a6f825d (patch)
tree214a6c12a0e3dd5b027af293c84351d101ec10c2 /libstdc++-v3/libsupc++
parent4a1ef3f6da1af60f4c71206c3200b3b82ffdb515 (diff)
downloadgcc-26a0ed818440959d3dbd86bcf60bfb8e6a6f825d.tar.gz
libstdc++-v3:
PR c++/9433 * libsupc++/tinfo.cc (__vmi_class_type_info::__do_dyncast): Cope with bases which are very ambiguous. gcc/testsuite: * g++.dg/abi/dcast1.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61973 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/libsupc++')
-rw-r--r--libstdc++-v3/libsupc++/tinfo.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/libstdc++-v3/libsupc++/tinfo.cc b/libstdc++-v3/libsupc++/tinfo.cc
index 74d13834af4..fe92ad7e7a2 100644
--- a/libstdc++-v3/libsupc++/tinfo.cc
+++ b/libstdc++-v3/libsupc++/tinfo.cc
@@ -1,5 +1,5 @@
// Methods for type_info for -*- C++ -*- Run Time Type Identification.
-// Copyright (C) 1994, 1996, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1994, 1996, 1998, 1999, 2000, 2001, 2002, 2003
// Free Software Foundation
//
// This file is part of GNU CC.
@@ -482,8 +482,9 @@ __do_dyncast (ptrdiff_t src2dst,
result.whole2dst =
__sub_kind (result.whole2dst | result2.whole2dst);
}
- else if ((result.dst_ptr != 0 | result_ambig)
- && (result2.dst_ptr != 0 | result2_ambig))
+ else if ((result.dst_ptr != 0 & result2.dst_ptr != 0)
+ || (result.dst_ptr != 0 & result2_ambig)
+ || (result2.dst_ptr != 0 & result_ambig))
{
// Found two different DST_TYPE bases, or a valid one and a set of
// ambiguous ones, must disambiguate. See whether SRC_PTR is