Issue 3373 - bad codeview debug info for long and ulong
Summary: bad codeview debug info for long and ulong
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: patch, wrong-code
Depends on:
Blocks:
 
Reported: 2009-10-07 23:58 UTC by Rainer Schuetze
Modified: 2015-06-09 01:29 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Rainer Schuetze 2009-10-07 23:58:40 UTC
The codeview debug info emitted by dmd for long and ulong types are a bad delegate and dynamic-array of ints, respectively.
Comment 1 Rainer Schuetze 2009-10-08 00:01:22 UTC
This is caused a bad check in cv4_typeidx() that will never use the basic types, because cv4_typidx(t->Tnext) never returns 0. Instead, t->Tnext should be tested:

Index: cgcv.c
===================================================================
--- cgcv.c	(revision 201)
+++ cgcv.c	(working copy)
@@ -1677,14 +1677,14 @@
     switch (tym)
     {
 	case TYllong:
-	    if (next)
+	    if (t->Tnext)
 		goto Ldelegate;
 	    assert(dt);
 	    typidx = dt;
 	    break;
 
 	case TYullong:
-	    if (next)
+	    if (t->Tnext)
 		goto Ldarray;
 	    assert(dt);
 	    typidx = dt;
Comment 2 Walter Bright 2010-02-05 02:58:12 UTC
changelog 369
Comment 3 Walter Bright 2010-03-08 22:19:56 UTC
Fixed dmd 1.057 and 2.041