From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28426 invoked by alias); 6 Nov 2008 11:52:35 -0000 Received: (qmail 17143 invoked by uid 48); 6 Nov 2008 11:51:13 -0000 Date: Thu, 06 Nov 2008 11:52:00 -0000 Message-ID: <20081106115113.17142.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/38030] [4.2/4.3/4.4 Regression] g++ template with overloaded function behave differently on "g++ 4.3.2" and "g++ 3.4.6" 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/msg00467.txt.bz2 ------- Comment #1 from rguenth at gcc dot gnu dot org 2008-11-06 11:51 ------- Confirmed. For the following neither f_ nor d_ are dependent and should be bound to f_ (B_ &) during first-stage name-lookup. For some reason this doesn't work - it does if d_ is of type B_ though. extern "C" void abort (); struct B_ { }; struct D_:public B_ { }; D_ d_; void f_ (B_ &) { } template < class T > void g_ (T t) { f_ (d_); } void f_ (D_ &) { abort (); } int main (int argc, char *argv[]) { D_ d; g_ (d); return 0; } -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords| |wrong-code Known to fail| |3.3.6 4.1.2 4.3.2 Known to work| |3.4.6 Last reconfirmed|0000-00-00 00:00:00 |2008-11-06 11:51:12 date| | Summary|g++ template with overloaded|[4.2/4.3/4.4 Regression] g++ |function behave differently |template with overloaded |on "g++ 4.3.2" and "g++ |function behave differently |3.4.6" |on "g++ 4.3.2" and "g++ | |3.4.6" http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38030