It appears that two different types from two different translation
units might have the same name in a DSO, like in the example of this
bug. This violates the One Definition Rule, which we rely on to go
fast, and more importantly, it introduces type canonicalization errors.
This patch recognizes more of these ODR violation cases by looking at
the size of the types. That is, if two types (from the same DSO) with
the same name have different sizes, then they are different.
* src/abg-ir.cc (type_base::get_canonical_type_for): Look at the
size of types with the same name which could be considered
ODR-equal, to spot possible violations that would induce a type
canonicalization error.
* tests/data/test-read-dwarf/test21-pr19092.so: New test input
binary.
* tests/data/test-read-dwarf/test21-pr19092.so.abi: New reference
abixml for the binary above.
* tests/data/Makefile.am: Add the new test input above to source
distribution.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
* tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
* tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
Likewise.
* tests/test-read-dwarf.cc (int_out_specs): Add the two test input
above.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>