Dwarf 3 and 4 state that if DW_AT_accessibility is missing, the default is DW_ACCESS_private in DW_TAG_class_type and DW_ACCESS_public otherwise. Unfortunately dwarf2out.c assumes the default is DW_ACCESS_public always. Not sure if GDB (or other dwarf consumers) makes the same assumption. If not, then we can add DW_ACCESS_public DW_AT_accessibility in DW_TAG_class_type for everything that didn't have it till now and drop DW_ACCESS_private accessibility, if yes, then I'm afraid all we can do for the time being is just add DW_ACCESS_public accessibility and keep DW_ACCESS_private accessibility too.
-- Summary: No DW_AT_accessibility for public DIEs in DW_TAG_class_type Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: wrong-debug Severity: normal Priority: P3 Component: debug AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jakub at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45124