diff options
author | Jason Merrill <jason@redhat.com> | 2015-05-05 22:24:38 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2015-05-05 22:24:38 -0400 |
commit | 15ed2619b28355685f8a0010e10dc4198941df38 (patch) | |
tree | 2579afedfc3001f0194141f8e203af7662b07db9 /gcc/cp | |
parent | f8aa3dd388ad8726e23c20e50bd7d4561fd0bc38 (diff) | |
download | gcc-15ed2619b28355685f8a0010e10dc4198941df38.zip gcc-15ed2619b28355685f8a0010e10dc4198941df38.tar.gz gcc-15ed2619b28355685f8a0010e10dc4198941df38.tar.bz2 |
Fix gdb.cp/anon-struct.cc with -std=c++11.
gcc/
* dwarf2out.c (gen_member_die): Don't emit anything for an
anonymous class constructor.
gcc/cp/
* decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
maybe-in-charge constructor.
From-SVN: r222839
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/decl2.c | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 04e6a50..029c649 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2015-05-05 Jason Merrill <jason@redhat.com> + * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a + maybe-in-charge constructor. + * decl.c (start_decl): Don't push the plain VAR_DECL for a variable template. diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index b2251d8..0d47847 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -2648,7 +2648,12 @@ reset_type_linkage_2 (tree type) if (TREE_CODE (m) == VAR_DECL) reset_decl_linkage (m); for (tree m = TYPE_METHODS (type); m; m = DECL_CHAIN (m)) - reset_decl_linkage (m); + { + reset_decl_linkage (m); + if (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (m)) + /* Also update its name, for cxx_dwarf_name. */ + DECL_NAME (m) = TYPE_IDENTIFIER (type); + } binding_table_foreach (CLASSTYPE_NESTED_UTDS (type), bt_reset_linkage_2, NULL); } |