From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9405 invoked by alias); 22 Sep 2011 23:10:43 -0000 Received: (qmail 9396 invoked by uid 22791); 22 Sep 2011 23:10:41 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 22 Sep 2011 23:10:28 +0000 From: "jyasskin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/50491] New: [C++0x] "unexpected ast of kind using_decl" on call to using'ed grandparent member function Date: Thu, 22 Sep 2011 23:29:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jyasskin at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: 2011-09/txt/msg01608.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D50491 Bug #: 50491 Summary: [C++0x] "unexpected ast of kind using_decl" on call to using'ed grandparent member function Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: jyasskin@gcc.gnu.org CC: aaw@google.com $ cat test.ii struct GrandParent { void *get(); }; template struct Parent : public GrandParent{ }; template struct Child : public Parent { using GrandParent::get; void Foo() { void* ex =3D get(); } }; $ clang++ -std=3Dgnu++0x -fsyntax-only test.ii $ g++-4.6 --version g++-4.6 (GCC) 4.6.1 $ g++-4.6 -std=3Dgnu++0x -fsyntax-only test.ii test.ii: In member function 'void Child::Foo()': test.ii:13:20: sorry, unimplemented: unexpected ast of kind using_decl test.ii:13: confused by earlier errors, bailing out $ g++-4.7svn --version g++-4.7svn (GCC) 4.7.0 20110911 (experimental) $ g++-4.7svn -std=3Dgnu++0x -fsyntax-only test.ii test.ii: In member function =E2=80=98void Child::Foo()=E2=80=99: test.ii:13:20: sorry, unimplemented: unexpected ast of kind using_decl test.ii:13:20: internal compiler error: in potential_constant_expression_1,= at cp/semantics.c:8226 If I change the "get()" line to "(void)get();", g++-4.6.1 succeeds, but g++= -4.7 still fails with the same error. Making GrandParent non-dependent by passin= g a concrete type to Parent<> makes both versions succeed.