http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56740
Bug #: 56740 Summary: duplicat DW_TAG_const_type Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug AssignedTo: unassig...@gcc.gnu.org ReportedBy: tro...@gcc.gnu.org I used this source, from PR 55608: static const char *a = "opq"; static const char b[8] = "rstuv"; static const char *c = b; static const char *d = b + 3; static const int e[] = { 1, 2, 3, 4 }; static int f[] = { 5, 6, 7 }; static const int *g = e; static const int *h = e + 2; static const int *i = f; static const int *j = f + 2; int main () { const char *p = "abcd"; const char *q = "efgh"; const char r[] = "ijk\0lmn"; const char *s = r; const char *t = b; const int *u = e; const int *v = e + 2; const int *w = f; const int *x = f + 2; return 0; } I compiled this with "gcc -g -O2", using git master gcc from yesterday. The DWARF contains some needless duplication: <1><fd>: Abbrev Number: 7 (DW_TAG_const_type) <fe> DW_AT_type : <0xe6> <1><12f>: Abbrev Number: 7 (DW_TAG_const_type) <130> DW_AT_type : <0xe6>