public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "daniel_beichl at gmx dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/47510] DW_TAG_typedef can have children when designating a naming typedef
Date: Mon, 10 Oct 2011 13:48:00 -0000	[thread overview]
Message-ID: <bug-47510-4-Lx0Oaua0lO@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-47510-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47510

dbeichl <daniel_beichl at gmx dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |daniel_beichl at gmx dot
                   |                            |net

--- Comment #15 from dbeichl <daniel_beichl at gmx dot net> 2011-10-10 13:47:15 UTC ---
The same thing can happen for unions in c++11. Consider the following:

struct some_struct
{
  some_struct() = default;
  some_struct(int v) {}
};

typedef union {
    int x;
    some_struct y;
} a_union_t;

a_union_t z;

This creates a DW_TAG_typedef with children. I propose to extend the
candidate patch to unions:

--- gcc/dwarf2out.c 2011-09-15 12:16:36.000000000 +0200
+++ gcc/dwarf2out.c 2011-10-10 13:56:09.000000000 +0200
@@ -8106,7 +8106,7 @@
 strip_naming_typedef (tree type, dw_die_ref type_die)
 {
   if (type
-      && TREE_CODE (type) == RECORD_TYPE
+      && ( TREE_CODE (type) == RECORD_TYPE || TREE_CODE (type) == UNION_TYPE )
       && type_die
       && type_die->die_tag == DW_TAG_typedef
       && is_naming_typedef_decl (TYPE_NAME (type)))


  parent reply	other threads:[~2011-10-10 13:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-28 11:42 [Bug debug/47510] New: " dodji at gcc dot gnu.org
2011-01-28 12:01 ` [Bug debug/47510] " dodji at gcc dot gnu.org
2011-01-28 17:02 ` dodji at gcc dot gnu.org
2011-02-03 15:21 ` jan.kratochvil at redhat dot com
2011-03-14 21:03 ` dodji at gcc dot gnu.org
2011-03-15 16:29 ` rguenth at gcc dot gnu.org
2011-03-16 10:25 ` dodji at gcc dot gnu.org
2011-03-16 20:19 ` [Bug debug/47510] [4.6/4.7 Regression] " dodji at gcc dot gnu.org
2011-03-16 21:11 ` dodji at gcc dot gnu.org
2011-03-16 21:19 ` dodji at gcc dot gnu.org
2011-03-16 21:33 ` [Bug debug/47510] " dodji at gcc dot gnu.org
2011-03-17 11:34 ` [Bug debug/47510] [4.6 Regression] " dodji at gcc dot gnu.org
2011-03-17 16:53 ` dodji at gcc dot gnu.org
2011-03-25 19:57 ` [Bug debug/47510] " jakub at gcc dot gnu.org
2011-04-14  8:14 ` dodji at gcc dot gnu.org
2011-04-14  8:28 ` jan.kratochvil at redhat dot com
2011-04-28 16:19 ` rguenth at gcc dot gnu.org
2011-10-10 13:48 ` daniel_beichl at gmx dot net [this message]
2012-03-04 18:31 ` eu at doxos dot eu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-47510-4-Lx0Oaua0lO@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).