FT32 makes use of multiple address spaces.
authorJames Bowman <james.bowman@ftdichip.com>
Tue, 7 Nov 2017 01:10:18 +0000 (01:10 +0000)
committerJames Bowman <jamesbowman@gcc.gnu.org>
Tue, 7 Nov 2017 01:10:18 +0000 (01:10 +0000)
commita297ccb52e0c894e8160c60319b71f5dedf28643
treec31b6993e4e0c4ca358998c53b8653a22223ef00
parent853c0dfba2e6afe6dbb17e58c300b38670524890
FT32 makes use of multiple address spaces.

FT32 makes use of multiple address spaces. When trying to inspect
objects in GDB, GDB was treating them as a straight "const". The cause
seems to be in GCC DWARF2 output.

This output is handled in gcc/gcc/dwarf2out.c, where modified_type_die()
checks that TYPE has qualifiers CV_QUALS. However while TYPE has
ADDR_SPACE qualifiers, the modified_type_die() explicitly discards the
ADDR_SPACE qualifiers.

This patch retains the ADDR_SPACE qualifiers as modified_type_die()
outputs the DWARF type tree.  This allows the types to match, and correct
type information for the object is emitted.

[gcc]

2017-11-06  James Bowman  <james.bowman@ftdichip.com>

* gcc/dwarf2out.c (modified_type_die): Retain ADDR_SPACE
qualifiers.
        (add_type_attribute) likewise.

From-SVN: r254484
gcc/ChangeLog
gcc/dwarf2out.c