aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/decl.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2016-08-12 07:11:23 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2016-08-12 07:11:23 +0000
commit8aaf799b005461231d75f0889e3c78bd9b35eed9 (patch)
tree737d04532927f66a28ff5e733a2d7ca27a390589 /gcc/fortran/decl.c
parentdf5b19dcc1a27395ba96503540ca0085ccaa7ef7 (diff)
downloadgcc-8aaf799b005461231d75f0889e3c78bd9b35eed9.zip
gcc-8aaf799b005461231d75f0889e3c78bd9b35eed9.tar.gz
gcc-8aaf799b005461231d75f0889e3c78bd9b35eed9.tar.bz2
[PR49366] emit loc exprs for C++ non-virtual pmf template value parms
We used to emit, in debug information, the values bound to pointer to member function template parameters only when they were NULL or virtual member functions, because those can be represented with DW_AT_const_value. In order to represent the symbolic pointer to member function constants for non-virtual member functions, we'd need to be able to emit relocations for part of DW_AT_const_value, which we don't. The more viable alternative is to use DW_AT_location to represent such values, as slated for inclusion in DWARFv5, according to <URL:http://www.dwarfstd.org/ShowIssue.php?issue=130412.1>. With this patch, when we can't emit a DW_AT_const_value, we emit each "member" of the pointer to member function "record" as a DW_OP_stack_value DW_OP_piece, as long as the referenced member function is output in the same translation unit, otherwise we'd get relocations to external symbols, something to avoid in debug sections. for gcc/ChangeLog PR debug/49366 * dwarf2out.c (loc_list_from_tree_1): Expand some CONSTRUCTORs in DW_OP_pieces, just enough to handle pointers to member functions. (gen_remaining_tmpl_value_param_die_attribute): Use a location expression on DWARFv5 if a constant value doesn't work. for gcc/testsuite/ChangeLog PR debug/49366 * g++.dg/debug/dwarf2/template-params-12.H: New. * g++.dg/debug/dwarf2/template-params-12f.C: New. * g++.dg/debug/dwarf2/template-params-12g.C: New. * g++.dg/debug/dwarf2/template-params-12n.C: New. * g++.dg/debug/dwarf2/template-params-12s.C: New. * g++.dg/debug/dwarf2/template-params-12u.C: New. * g++.dg/debug/dwarf2/template-params-12v.C: New. * g++.dg/debug/dwarf2/template-params-12w.C: New. From-SVN: r239401
Diffstat (limited to 'gcc/fortran/decl.c')
0 files changed, 0 insertions, 0 deletions