aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2004-02-06 18:37:25 +0000
committerUlrich Weigand <uweigand@gcc.gnu.org>2004-02-06 18:37:25 +0000
commit3199cb41b8ce1a062ef9f065bc3536bff0d9c401 (patch)
tree3e63fd7698ceb5418813feeaf0bff5089266fb09 /gcc
parent1a6dd8a2b8b9817d852588708a90d30618c02903 (diff)
downloadgcc-3199cb41b8ce1a062ef9f065bc3536bff0d9c401.zip
gcc-3199cb41b8ce1a062ef9f065bc3536bff0d9c401.tar.gz
gcc-3199cb41b8ce1a062ef9f065bc3536bff0d9c401.tar.bz2
re PR debug/11816 (Incorrect debugging information for anonymous structures)
PR debug/11816 * dwarf2out.c (gen_decl_die): Handle anonymous struct members. From-SVN: r77411
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/dwarf2out.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 19454ac..ebedd17 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2004-02-06 Ulrich Weigand <uweigand@de.ibm.com>
+ PR debug/11816
+ * dwarf2out.c (gen_decl_die): Handle anonymous struct members.
+
+2004-02-06 Ulrich Weigand <uweigand@de.ibm.com>
+
* cfganal.c (flow_call_edges_add): Never split a libcall block.
2004-02-06 Daniel Berlin <dberlin@dberlin.org>
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 468b6dd..6869873 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -12192,9 +12192,10 @@ gen_decl_die (tree decl, dw_die_ref context_die)
case FIELD_DECL:
/* Ignore the nameless fields that are used to skip bits but handle C++
- anonymous unions. */
+ anonymous unions and structs. */
if (DECL_NAME (decl) != NULL_TREE
- || TREE_CODE (TREE_TYPE (decl)) == UNION_TYPE)
+ || TREE_CODE (TREE_TYPE (decl)) == UNION_TYPE
+ || TREE_CODE (TREE_TYPE (decl)) == RECORD_TYPE)
{
gen_type_die (member_declared_type (decl), context_die);
gen_field_die (decl, context_die);