Variables fabricated by tree-ssa passes get used in diagnostics instead of those written by users in their codes. That can lead to really confusing diagnostics. I noticed this wen compiling my own applications that I cannot reduce to manageabe size. The snippet below reproduces the basic problem, but is too simplistic. I hope a bugmaster would make it more complicated, still manageable.
Consider % cat sra-name.C struct A { int i; A() { } }; int main() { A a; return a.i; } Compiling the above with current mainline gives % g++ -O2 -Wall -c sra-name.C sra-name.C: In function 'int main()': sra-name.C:8: warning: 'a$i' is used uninitialized in this function Notice the "a$i" which should have been "a.i". In my application, I get weird names like 'SR.20649', which looks definitely dubious and confusing. -- Summary: Confusing identifiers in diagnostics Product: gcc Version: 4.0.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P2 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: gdr at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org GCC host triplet: native, target-independent http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19196