[Bug debug/63239] DWARF does not represent C++ deleted methods

2014-11-21 Thread fxcoudert at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63239

Francois-Xavier Coudert fxcoudert at gcc dot gnu.org changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
   Last reconfirmed||2014-11-21
 CC||fxcoudert at gcc dot gnu.org
 Resolution|FIXED   |---
 Ever confirmed|0   |1

--- Comment #4 from Francois-Xavier Coudert fxcoudert at gcc dot gnu.org ---
The testcase fails on x86_64-apple-darwin14. With g++ -O -std=c++11 -g -dA
a.c, we have the following optimized tree dump:

;; Function void bar() (_Z3barv, funcdef_no=3, decl_uid=2126, cgraph_uid=3,
symbol_order=3)
void bar() ()
{
  bb 2:
  # DEBUG this = foo
  return;
}

The assembler (see attachment) does not contain DW_AT_GNU_deleted.


[Bug debug/63239] DWARF does not represent C++ deleted methods

2014-11-21 Thread fxcoudert at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63239

--- Comment #5 from Francois-Xavier Coudert fxcoudert at gcc dot gnu.org ---
Created attachment 34063
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34063action=edit
Assembler generated at -O -std=c++11 -g -dA


[Bug debug/63239] DWARF does not represent C++ deleted methods

2014-11-21 Thread mark at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63239

--- Comment #6 from Mark Wielaard mark at gcc dot gnu.org ---
It looks like for some reason Darwin defaults to some ancient (v2) strict
version of DWARF. Please try adding -gno-strict-dwarf -gdwarf-4 to
gcc/testsuite/g++.dg/debug/dwarf2/deleted-member-function.C dg-options.


[Bug debug/63239] DWARF does not represent C++ deleted methods

2014-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63239

--- Comment #7 from Jakub Jelinek jakub at gcc dot gnu.org ---
(In reply to Mark Wielaard from comment #6)
 It looks like for some reason Darwin defaults to some ancient (v2) strict
 version of DWARF. Please try adding -gno-strict-dwarf -gdwarf-4 to
 gcc/testsuite/g++.dg/debug/dwarf2/deleted-member-function.C dg-options.

The reason for that is that Darwin has a set of tools that crash or otherwise
break on valid DWARF 3 or DWARF 4 or various extensions.  So using -gdwarf-2
and -gstrict-dwarf by default is necessary because of badly written toolchain.


[Bug debug/63239] DWARF does not represent C++ deleted methods

2014-11-21 Thread fxcoudert at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63239

--- Comment #8 from Francois-Xavier Coudert fxcoudert at gcc dot gnu.org ---
(In reply to Jakub Jelinek from comment #7)
 So using
 -gdwarf-2 and -gstrict-dwarf by default is necessary because of badly
 written toolchain.

I had tried -gdwarf-4, but didn't know about -gstrict-dwarf. Will commit the
obvious patch, then.


[Bug debug/63239] DWARF does not represent C++ deleted methods

2014-11-21 Thread fxcoudert at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63239

--- Comment #9 from Francois-Xavier Coudert fxcoudert at gcc dot gnu.org ---
Author: fxcoudert
Date: Fri Nov 21 13:27:57 2014
New Revision: 217918

URL: https://gcc.gnu.org/viewcvs?rev=217918root=gccview=rev
Log:
PR debug/63239
* g++.dg/debug/dwarf2/deleted-member-function.C: Pass
-gno-strict-dwarf on darwin.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/debug/dwarf2/deleted-member-function.C


[Bug debug/63239] DWARF does not represent C++ deleted methods

2014-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63239

--- Comment #10 from Jakub Jelinek jakub at gcc dot gnu.org ---
You should pass -gno-strict-dwarf unconditionally, I think vxworks has similar
defaults as darwin.


[Bug debug/63239] DWARF does not represent C++ deleted methods

2014-11-21 Thread fxcoudert at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63239

--- Comment #11 from Francois-Xavier Coudert fxcoudert at gcc dot gnu.org ---
Author: fxcoudert
Date: Fri Nov 21 13:32:08 2014
New Revision: 217920

URL: https://gcc.gnu.org/viewcvs?rev=217920root=gccview=rev
Log:
PR debug/63239
* g++.dg/debug/dwarf2/deleted-member-function.C: Pass
-gno-strict-dwarf.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/debug/dwarf2/deleted-member-function.C


[Bug debug/63239] DWARF does not represent C++ deleted methods

2014-11-21 Thread fxcoudert at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63239

Francois-Xavier Coudert fxcoudert at gcc dot gnu.org changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

--- Comment #12 from Francois-Xavier Coudert fxcoudert at gcc dot gnu.org ---
(In reply to Jakub Jelinek from comment #10)
 You should pass -gno-strict-dwarf unconditionally, I think vxworks has
 similar defaults as darwin.

OK, it's true it cannot hurt as we're not calling the assembler anyway.


[Bug debug/63239] DWARF does not represent C++ deleted methods

2014-10-05 Thread mark at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63239

--- Comment #2 from Mark Wielaard mark at gcc dot gnu.org ---
Author: mark
Date: Sun Oct  5 15:25:03 2014
New Revision: 215901

URL: https://gcc.gnu.org/viewcvs?rev=215901root=gccview=rev
Log:
PR debug/63239 Add DWARF representation for C++11 deleted member function.

include/ChangeLog

* dwarf2.def (DW_AT_GNU_deleted): New attribute.

gcc/ChangeLog

* dwarf2out.c (gen_subprogram_die): When a member function is
explicitly deleted then add a DW_AT_GNU_deleted attribute.
* langhooks.h (struct lang_hooks_for_decls): Add
function_decl_deleted_p langhook.
* langhooks-def.h (LANG_HOOKS_FUNCTION_DECL_DELETED_P): Define.
(LANG_HOOKS_DECLS): Add LANG_HOOKS_FUNCTION_DECL_DELETED_P.

gcc/cp/ChangeLog

* cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_DELETED_P): Define.
(cp_function_decl_deleted_p): New prototype.
* cp-objcp-common.c (cp_function_deleted_p): New function.

gcc/testsuite/ChangeLog

* g++.dg/debug/dwarf2/deleted-member-function.C: New testcase.

Added:
trunk/gcc/testsuite/g++.dg/debug/dwarf2/deleted-member-function.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.h
trunk/gcc/testsuite/ChangeLog
trunk/include/ChangeLog
trunk/include/dwarf2.def


[Bug debug/63239] DWARF does not represent C++ deleted methods

2014-10-05 Thread mark at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63239

Mark Wielaard mark at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Mark Wielaard mark at gcc dot gnu.org ---
https://gcc.gnu.org/ml/gcc-patches/2014-10/msg00272.html


[Bug debug/63239] DWARF does not represent C++ deleted methods

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

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 CC||dodji at gcc dot gnu.org,
   ||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek jakub at gcc dot gnu.org ---
Perhaps we need some DWARF extension for this?