This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

debug/2971: Type of variable is wrong in dwarf2 debugging info



>Number:         2971
>Category:       debug
>Synopsis:       Type of variable is wrong in dwarf2 debugging info
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 27 03:26:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     kettenis@gnu.org
>Release:        GCC 3.0 20010525
>Organization:
>Environment:
alpha-unknown-freebsd5.0 and i586-pc-linux-gnu
>Description:
Compiling the attached test with -gdwarf-2 -dA, we find DW_AT_type of variable lave points
at the DW_TAG_const_type die constructed for the argument cc, instead of pointing directly
to the DW_TAG_base_type that represents type unsigned char.

This is a regression from GCC 2.95.2.

This is a similar problem as the one described in PR 2813 (and I shamelessly copied parts
of that report).  Apparently the fix for that problem wasn't complete.
The problem that when modified_type_die is called, a tree node for "const unsigned char"
isn't available, so qualified_type will be NULL.  As a result the newly created DIE for
"const unsigned char" is equated to the tree node for its base type.
>How-To-Repeat:

>Fix:
I'll send a patch later :-).
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="t.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="t.c"

aW50CnF1eDEgKGNvbnN0IHVuc2lnbmVkIGNoYXIgY2MpCnsKICB1bnNpZ25lZCBjaGFyIGxhdmUg
PSAnQic7Cn0K


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]