* dwarf2loc.c (invalid_synthetic_pointer): Move earlier.
(indirect_pieced_value): Call dwarf2_fetch_constant_bytes
if needed.
* dwarf2loc.h (dwarf2_fetch_constant_bytes): Declare.
* dwarf2read.c (write_constant_as_bytes)
(dwarf2_fetch_constant_bytes): New functions.
gdb/testsuite
* gdb.dwarf2/implptrconst.c: New file.
* gdb.dwarf2/implptrconst.exp: New file.
* lib/dwarf.exp (Dwarf::_nz_quote): New proc.
(Dwarf::_handle_DW_FORM): Handle DW_FORM_block1.
(Dwarf::_location): Handle DW_OP_GNU_implicit_pointer.