Regression against g++-4.3 for g++-4.4 on the variable `problem': g++ (GCC) 4.4.0 20090303 (experimental): <1><54>: Abbrev Number: 8 (DW_TAG_subprogram) <55> DW_AT_specification: <0x33> <5a> DW_AT_inline : 0 (not inlined) <2><72>: Abbrev Number: 11 (DW_TAG_lexical_block) <3><73>: Abbrev Number: 12 (DW_TAG_variable) <74> DW_AT_name : (indirect string, offset: 0x14): problem <7a> DW_AT_type : <0x85> (DW_AT_location is not found by any abstract_origin or specificatione etc.)
g++ (GCC) 4.4.0 20090219 (Red Hat 4.4.0-0.21): <1><54>: Abbrev Number: 8 (DW_TAG_subprogram) <55> DW_AT_specification: <0x33> <5a> DW_AT_inline : 0 (not inlined) <2><73>: Abbrev Number: 12 (DW_TAG_variable) <74> DW_AT_name : (indirect string, offset: 0x1a): problem <7a> DW_AT_type : <0x10b> it worked before - g++ (GCC) 4.3.2 20081105 (Red Hat 4.3.2-7): <1><85>: Abbrev Number: 10 (DW_TAG_subprogram) <86> DW_AT_specification: <0x33> <8b> DW_AT_inline : 0 (not inlined) <2><a3>: Abbrev Number: 13 (DW_TAG_variable) <a4> DW_AT_name : (indirect string, offset: 0x14): problem <aa> DW_AT_type : <0x7f> <ae> DW_AT_location : 9 byte block: 3 8 0 0 0 0 0 0 0 (DW_OP_addr: 8) ------------------------------------------------------------------------------- extern void f (int *); class A { public: A(int i); }; A::A(int i) { static int *problem = new int(i); f (problem); } void f (int *) { } int main (void) { A a(42); return 0; } -- Summary: Missing DW_AT_location for constructor static variable Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jan dot kratochvil at redhat dot com GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39372