From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17424 invoked by alias); 6 Nov 2008 12:56:05 -0000 Received: (qmail 7230 invoked by uid 48); 6 Nov 2008 12:54:44 -0000 Date: Thu, 06 Nov 2008 12:56:00 -0000 Message-ID: <20081106125444.7229.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/38030] [4.2/4.3/4.4 Regression] name-lookup for non-dependent name in template function is wrong In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-11/txt/msg00472.txt.bz2 ------- Comment #3 from rguenth at gcc dot gnu dot org 2008-11-06 12:54 ------- We seem to not know if we bound f_ already. Instead another round of koenig lookup is applied from #0 perform_koenig_lookup (fn=0x7ffff6458500, args=0x7ffff6463480) at /space/rguenther/src/svn/trunk/gcc/cp/semantics.c:1797 #1 0x00000000004c9e14 in tsubst_copy_and_build (t=0x7ffff7ebd870, args=0x7ffff64631b0, complain=tf_warning_or_error, in_decl=0x7ffff6461780, function_p=0 '\0', integral_constant_expression_p=0 '\0') at /space/rguenther/src/svn/trunk/gcc/cp/pt.c:11293 #2 0x00000000004c6798 in tsubst_expr (t=0x7ffff7ebd870, args=0x7ffff64631b0, complain=tf_warning_or_error, in_decl=0x7ffff6461780, integral_constant_expression_p=0 '\0') at /space/rguenther/src/svn/trunk/gcc/cp/pt.c:10880 #3 0x00000000004bff18 in tsubst_expr (t=0x7ffff644a5c0, args=0x7ffff64631b0, complain=tf_warning_or_error, in_decl=0x7ffff6461780, integral_constant_expression_p=0 '\0') at /space/rguenther/src/svn/trunk/gcc/cp/pt.c:10483 #4 0x00000000004c1c98 in tsubst_expr (t=0x7ffff7ebd7d0, args=0x7ffff64631b0, complain=tf_warning_or_error, in_decl=0x7ffff6461780, integral_constant_expression_p=0 '\0') at /space/rguenther/src/svn/trunk/gcc/cp/pt.c:10630 #5 0x00000000004e78c5 in instantiate_decl (d=0x7ffff6458900, defer_ok=0, expl_inst_class_mem_p=0 '\0') at /space/rguenther/src/svn/trunk/gcc/cp/pt.c:15378 #6 0x00000000004e7f8c in instantiate_pending_templates (retries=0) at /space/rguenther/src/svn/trunk/gcc/cp/pt.c:15474 #7 0x0000000000540bb0 in cp_write_global_declarations () at /space/rguenther/src/svn/trunk/gcc/cp/decl2.c:3364 note the instantiation is from cp_write_global_declarations which is after the whole unit is parsed, which may explain comment #2. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38030