1 In the 2.3.2 release of gcc/g++, how the compiler handles resolving
2 multiple inheritance lattices was reworked to properly discover
3 ambiguities. We recently found an example which causes this new
4 algorithm to fail in a very subtle way. For the time being, this
5 patch will make the compiler use the old algorithm, which works for
6 the failing case we've found. Note it will revert the compiler's
7 ability to properly deduce MI ambiguities in many cases (to its state
8 in 2.2.2 and 2.3.1). This bug will be fixed in the next gcc/g++
13 *** cp-search.c.~1~ Thu Feb 18 18:03:24 1993
14 --- cp-search.c Thu Feb 18 18:03:27 1993
18 if ((*qfn)(base_binfo))
21 if (fn == dfs_init_vbase_pointers)
26 saw_first_vbase = save_saw_first_vbase;
29 dfs_walk (base_binfo, fn, qfn);
31 *************** dfs_init_vbase_pointers (binfo)
37 this_vbase_ptr = vbase_decl_ptr_intermediate;
39 *************** dfs_init_vbase_pointers (binfo)
41 if (TYPE_POINTER_TO (type) != TREE_TYPE (this_vbase_ptr))
42 my_friendly_abort (125);
45 distance = get_base_distance (type, TREE_TYPE (vbase_decl), 0, &path);
49 if (TYPE_POINTER_TO (type) != TREE_TYPE (this_vbase_ptr))
50 my_friendly_abort (125);
53 distance = get_base_distance (type, TREE_TYPE (vbase_decl), 0, &path);
57 *************** dfs_init_vbase_pointers (binfo)
60 error ("inheritance lattice too complex below");
65 *************** dfs_init_vbase_pointers (binfo)
68 this_vbase_ptr = convert_pointer_to (type, vbase_decl_ptr);
71 /* This happens when it is ambiguous. */
72 if (this_vbase_ptr == error_mark_node)