[patch] Fix debug info for discriminated record types

Eric Botcazou ebotcazou@adacore.com
Wed Jul 3 10:12:00 GMT 2019


Hi,

this is a regression present on the mainline and 9 branch: since
  https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01066.html
the debug info emitted in Ada with -fgnat-encodings=minimal for discriminated 
record types containing an array component whose bound is a discriminant is 
incomplete, i.e. the DW_AT_*_bound attribute of the range subtype is missing.

Tested on x86_64-suse-linux, OK for mainline and 9 branch?


2019-07-03  Eric Botcazou  <ebotcazou@adacore.com>

	* dwarf2out.c (add_scalar_info): Add back refererence to existing DIE
	if it has the DW_AT_data_member_location attribute.


2019-07-03  Eric Botcazou  <ebotcazou@adacore.com>

	* gnat.dg/specs/debug1.ads: New test.
	
-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-patch
Size: 445 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190703/a62a9a1a/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debug1.ads
Type: text/x-adasrc
Size: 411 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190703/a62a9a1a/attachment-0001.bin>


More information about the Gcc-patches mailing list