diff options
author | Pierre-Marie de Rodat <derodat@adacore.com> | 2017-06-01 08:36:57 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2017-06-01 08:36:57 +0000 |
commit | 9285616cbd8a079a6a72f07b47880244114ee4b2 (patch) | |
tree | cdd7675142b8599bcec2e279fab4666ff82886c1 /gcc/c | |
parent | 3fa4634c9250a7e0c51c1eac04d98b2fae032c60 (diff) | |
download | gcc-9285616cbd8a079a6a72f07b47880244114ee4b2.zip gcc-9285616cbd8a079a6a72f07b47880244114ee4b2.tar.gz gcc-9285616cbd8a079a6a72f07b47880244114ee4b2.tar.bz2 |
DWARF: for variants, produce unsigned discr. when debug type is unsigned
In Ada, the Character type is supposed to be unsigned. However,
depending on the sign of C char types, GNAT can materialize it as a
signed type for code generation purposes. When this is the case, GNAT
also attach a debug type to it so it is represented as an unsigned base
type in the debug information.
This change adapts record variant parts processing in the DWARF back-end
so that when the debug type of discriminant is unsigned while
discriminant values are signed themselves, we output unsigned
discriminant values in DWARF.
gcc/
* dwarf2out.c (get_discr_value): Call the get_debug_type hook on
the type of the input discriminant value. Convert the
discriminant value of signedness vary.
gcc/testsuite/
* gnat.dg/debug11.adb: New testcase.
From-SVN: r248773
Diffstat (limited to 'gcc/c')
0 files changed, 0 insertions, 0 deletions