[Bug debug/56974] c++ ref qualifiers not represented in DWARF

2016-11-04 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56974

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 CC||jakub at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #11 from Jakub Jelinek  ---
Fixed for 7+.

[Bug debug/56974] c++ ref qualifiers not represented in DWARF

2016-11-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56974

--- Comment #10 from Jakub Jelinek  ---
Author: jakub
Date: Thu Nov  3 21:18:49 2016
New Revision: 241832

URL: https://gcc.gnu.org/viewcvs?rev=241832=gcc=rev
Log:
PR debug/28767
PR debug/56974
* langhooks.h (struct lang_hooks_for_types): Add type_dwarf_attribute
langhook.
* langhooks.c (lhd_type_dwarf_attribute): New function.
* langhooks-def.h (lhd_type_dwarf_attribute): Declare.
(LANG_HOOKS_TYPE_DWARF_ATTRIBUTE): Define.
(LANG_HOOKS_FOR_TYPES_INITIALIZER): Add
LANG_HOOKS_TYPE_DWARF_ATTRIBUTE.
(check_qualified_type, check_aligned_type): Call it.
* dwarf2out.c (modified_type_die): Don't use type_main_variant
for FUNCTION_TYPE or METHOD_TYPE, instead walk over variants with
check_base_type and check_lang_type.
(gen_ptr_to_mbr_type_die): If lookup_type_die is already non-NULL,
return early.  For pointer-to-data-member add DW_AT_use_location
attribute.
(gen_subroutine_type_die): Add DW_AT_{,rvalue_}reference attribute
if needed.
(gen_type_die_with_usage): Don't use type_main_variant
for FUNCTION_TYPE or METHOD_TYPE, instead walk over variants with
check_base_type and check_lang_type.  Formatting fixes. Call
get_debug_type langhook.
cp/
* tree.c (cp_check_qualified_type): Use check_base_type and
TYPE_QUALS comparison instead of check_qualified_type.
(cxx_type_hash_eq): Return false if type_memfn_rqual don't match.
* cp-objcp-common.c (cp_get_debug_type): New function.
(cp_decl_dwarf_attribute): Don't handle types here.
(cp_type_dwarf_attribute): New function.
* cp-objcp-common.h (cp_get_debug_type, cp_type_dwarf_attribute):
Declare.
(LANG_HOOKS_GET_DEBUG_TYPE, LANG_HOOKS_TYPE_DWARF_ATTRIBUTE):
Define.
testsuite/
* g++.dg/debug/dwarf2/ptrdmem-1.C: New test.
* g++.dg/debug/dwarf2/ref-3.C: New test.
* g++.dg/debug/dwarf2/ref-4.C: New test.
* g++.dg/debug/dwarf2/refqual-1.C: New test.
* g++.dg/debug/dwarf2/refqual-2.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/debug/dwarf2/ptrdmem-1.C
trunk/gcc/testsuite/g++.dg/debug/dwarf2/ref-3.C
trunk/gcc/testsuite/g++.dg/debug/dwarf2/ref-4.C
trunk/gcc/testsuite/g++.dg/debug/dwarf2/refqual-1.C
trunk/gcc/testsuite/g++.dg/debug/dwarf2/refqual-2.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-objcp-common.c
trunk/gcc/cp/cp-objcp-common.h
trunk/gcc/dwarf2out.c
trunk/gcc/langhooks-def.h
trunk/gcc/langhooks.c
trunk/gcc/langhooks.h
trunk/gcc/testsuite/ChangeLog

[Bug debug/56974] c++ ref qualifiers not represented in DWARF

2016-08-12 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56974

Alexandre Oliva  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||aoliva at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |aoliva at gcc dot 
gnu.org

--- Comment #9 from Alexandre Oliva  ---
Created attachment 39274
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39274=edit
Patch I'm testing

Mine.  I'm testing a patch that implements DW_AT_reference and
DW_AT_rvalue_reference in declarations and in subroutine types, modifying
pointer to member types to be output in a DWARF-2-compliant way (a
DW_TAG_ptr_to_member_type, rather than as a record type).  While at that, I've
arranged for us to output DW_AT_use_location for pointers to data members.

[Bug debug/56974] c++ ref qualifiers not represented in DWARF

2016-06-03 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56974

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|5.4 |5.5

--- Comment #8 from Richard Biener  ---
GCC 5.4 is being released, adjusting target milestone.

[Bug debug/56974] c++ ref qualifiers not represented in DWARF

2015-12-04 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56974

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|5.3 |5.4

--- Comment #7 from Richard Biener  ---
GCC 5.3 is being released, adjusting target milestone.

[Bug debug/56974] c++ ref qualifiers not represented in DWARF

2015-07-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56974

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|5.2 |5.3

--- Comment #6 from Richard Biener rguenth at gcc dot gnu.org ---
GCC 5.2 is being released, adjusting target milestone to 5.3.


[Bug debug/56974] c++ ref qualifiers not represented in DWARF

2015-04-22 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56974

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|5.0 |5.2

--- Comment #5 from Jakub Jelinek jakub at gcc dot gnu.org ---
GCC 5.1 has been released.


[Bug debug/56974] c++ ref qualifiers not represented in DWARF

2014-09-12 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56974

Marek Polacek mpolacek at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-09-12
 CC||mpolacek at gcc dot gnu.org
   Target Milestone|--- |5.0
 Ever confirmed|0   |1

--- Comment #4 from Marek Polacek mpolacek at gcc dot gnu.org ---
Confirmed.


[Bug debug/56974] c++ ref qualifiers not represented in DWARF

2014-06-26 Thread mark at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56974

--- Comment #3 from Mark Wielaard mark at gcc dot gnu.org ---
There is DWARFv5 proposal for this now:
http://dwarfstd.org/ShowIssue.php?issue=131105.1
This adds DW_AT_reference[_qualifier] and DW_AT_rvalue_reference[_qualifier] as
attributes to DW_TAG_subprogram or DW_TAG_subroutine_type.


[Bug debug/56974] c++ ref qualifiers not represented in DWARF

2014-03-06 Thread jan.kratochvil at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56974

Jan Kratochvil jan.kratochvil at redhat dot com changed:

   What|Removed |Added

 CC||jan.kratochvil at redhat dot 
com

--- Comment #1 from Jan Kratochvil jan.kratochvil at redhat dot com ---
: g++-4.8.2 for 'void f(int r) {}' produces DW_TAG_rvalue_reference_type.

Or do you mean something else?



[Bug debug/56974] c++ ref qualifiers not represented in DWARF

2014-03-06 Thread tromey at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56974

--- Comment #2 from Tom Tromey tromey at gcc dot gnu.org ---
(In reply to Jan Kratochvil from comment #1)
 : g++-4.8.2 for 'void f(int r) {}' produces
 DW_TAG_rvalue_reference_type.
 
 Or do you mean something else?

ref qualifiers is a term from C++11 relating to the
mechanism for putting constraints on the receiver
of a method call.  E.g.:
http://gcc.gnu.org/ml/gcc-patches/2013-04/msg00024.html