From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5154 invoked by alias); 27 Jul 2011 18:46:30 -0000 Received: (qmail 5145 invoked by uid 22791); 27 Jul 2011 18:46:29 -0000 X-SWARE-Spam-Status: No, hits=-7.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx4-phx2.redhat.com (HELO mx4-phx2.redhat.com) (209.132.183.25) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 27 Jul 2011 18:46:09 +0000 Received: from mail05.corp.redhat.com (zmail05.collab.prod.int.phx2.redhat.com [10.5.5.46]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p6RIk9wa012580; Wed, 27 Jul 2011 14:46:09 -0400 Date: Wed, 27 Jul 2011 19:24:00 -0000 Subject: Re: [PATCH] Propagate source locations from function_decls to their template_decls Message-ID: <6gr49siam7ck2vjsec5wma38.1311792363307@email.android.com> From: Jason Merrill To: Jeffrey Yasskin , gcc-patches@gcc.gnu.org Cc: Paolo Carlini MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-07/txt/msg02457.txt.bz2 Yes. Jeffrey Yasskin wrote: 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 wrote: > Ok. > > Jeffrey Yasskin 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 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 ? >> >> ? ? ? ?* 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 ? >> >> ? ? ? ?* g++.old-deja/g++.pt/crash60.C: Updated. >> >> libstdc++-v3/ChangeLog: >> 2011-07-26 ? Jeffrey Yasskin ? >> >> ? ? ? ?* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Updated. >> >