Thanks. I'll commit to trunk in the morning when I can be around to watch for breakage.
Is this also ok for gcc-4_6-branch? On Tue, Jul 26, 2011 at 7:16 PM, Jason Merrill <ja...@redhat.com> wrote: > Ok. > > Jeffrey Yasskin <jyass...@google.com> wrote: > > Hi Jason. Paolo suggested I ping you directly about this patch for the > C++ parser. Thanks in advance for taking a look. > > On Tue, Jul 26, 2011 at 2:20 PM, Jeffrey Yasskin <jyass...@google.com> wrote: >> This patch copies the source location of a FUNCTION_DECL to the >> TEMPLATE_DECL that build_template_decl() builds out of it. Otherwise, >> the TEMPLATE_DECL's location becomes input_location, which is the end >> of the parameter list, while the FUNCTION_DECL's location is the >> location of the name of the function. Depending on what order >> templates are defined and used, gcc may emit either the >> FUNCTION_DECL's or TEMPLATE_DECL's location into the debug location, >> which causes gold's ODR checker to emit false positives. >> >> Tested with a bootstrap+`make -k check-c++` on >> x86_64-unknown-linux-gnu. I'm looking to check it in to trunk, and >> will propagate it to the gcc-4_6-branch if you think that's the right >> thing to do. >> >> No more tests fail than in >> http://gcc.gnu.org/ml/gcc-testresults/2011-07/msg02995.html. >> >> gcc/cp/ChangeLog: >> 2011-07-26 ? Jeffrey Yasskin ?<jyass...@google.com> >> >> ? ? ? ?* pt.c (build_template_decl): Copy the function_decl's source >> ? ? ? ?location to the new template_decl. >> >> gcc/testsuite/ChangeLog: >> 2011-07-26 ? Jeffrey Yasskin ?<jyass...@google.com> >> >> ? ? ? ?* g++.old-deja/g++.pt/crash60.C: Updated. >> >> libstdc++-v3/ChangeLog: >> 2011-07-26 ? Jeffrey Yasskin ?<jyass...@google.com> >> >> ? ? ? ?* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Updated. >> >