+ && (mode != Pmode + || GET_MODE_SIZE (ptr_mode) != DWARF2_ADDR_SIZE
This test seems overly cautious; it seems implausible to have DWARF2_ADDR_SIZE smaller than GET_MODE_SIZE (ptr_mode), and having it be larger doesn't seem like a problem.
+ || mem_mode == VOIDmode)
We can't handle Pmode void* like other pointers? Jason