Bug 45717 - [4.5 Regression] regression in debug info on simple C++ code
Summary: [4.5 Regression] regression in debug info on simple C++ code
Status: RESOLVED DUPLICATE of bug 44645
Alias: None
Product: gcc
Classification: Unclassified
Component: debug (show other bugs)
Version: 4.5.2
: P3 normal
Target Milestone: 4.5.2
Assignee: Not yet assigned to anyone
URL:
Keywords: wrong-debug
Depends on:
Blocks:
 
Reported: 2010-09-18 12:48 UTC by Arnaud Charlet
Modified: 2010-09-18 13:20 UTC (History)
7 users (show)

See Also:
Host:
Target:
Build:
Known to work: 4.3.6 4.4.3 4.4.5 4.6.0
Known to fail: 4.5.2
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arnaud Charlet 2010-09-18 12:48:19 UTC
Given the following simple code snippet, tested on x86_64-pc-linux-gnu,
i686-pc-linux-gnu, and i686-pc-mingw32:

<<
struct Elem {
   int data;
   struct Elem* next;
};

int main () {
   struct Elem* list;
   return 0;
}
>>

Compile with:
g++ main.cc -o main

run under gdb:
gdb main
ptype Elem

yields:
type = struct Elem {
    int data;
    void *next;
}

instead of (with e.g. g++ 4.4.3):
type = struct Elem {
    int data;
    Elem *next;
}
Comment 1 Arnaud Charlet 2010-09-18 12:51:35 UTC
Note that this works fine on mainline and 4.3.x, 4.4.x
Comment 2 Jonathan Wakely 2010-09-18 13:20:47 UTC

*** This bug has been marked as a duplicate of 44645 ***