On 08/18/2016 03:33 AM, Pierre-Marie de Rodat wrote:
Hello,
A check in dwarf2out_imported_module_or_decl prevents valid strict
DWARF2 constructs such as DW_TAG_imported_declaration from being emitted
in dwarf2out_imported_module_or_decl_1.
The latter already protects the emission of newer DWARF tags with
appropriate checks, so the one in the former is redundant and
pessimistic. This function is already called from places like
process_scope_var, which are not protected anyway.
This patch removes the check in dwarf2out_imported_module_or_decl so
that tags like DW_TAG_imported_declaration are emitted even in strict
DWARF2 mode.
Bootstrapped and regtested on x86_64-linux, no regression. I also
checked that the new testcase fails on mainline. Ok to commit?
Thank you in advance!
gcc/
* dwarf2out.c (dwarf2out_imported_module_or_decl): Remove
pessimistic DWARF version check.
gcc/testsuite/
* gnat.dg/debug7.adb, gnat.dg/debug7.ads: New testcase.
Jakub -- you want to take a looksie at this one? Jason is on PTO for
the next couple weeks. I'm not well versed enough to verify that
d_i_m_o_d_1 has all the right checks or not.
Jeff