From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13051 invoked by alias); 30 Dec 2008 05:23:30 -0000 Received: (qmail 12900 invoked by uid 48); 30 Dec 2008 05:22:04 -0000 Date: Tue, 30 Dec 2008 05:23:00 -0000 Message-ID: <20081230052204.12899.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/37093] [4.2/4.3/4.4 Regression] ICE with pointer to member template parameters In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia 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-12/txt/msg02879.txt.bz2 ------- Comment #12 from pinskia at gcc dot gnu dot org 2008-12-30 05:22 ------- (In reply to comment #11) > Patch which I am testing: > Index: pt.c > =================================================================== > --- pt.c (revision 142951) > +++ pt.c (working copy) > @@ -4626,6 +4626,13 @@ convert_nontype_argument (tree type, tre > expr = perform_qualification_conversions (type, expr); > if (expr == error_mark_node) > return expr; > + if (TREE_CODE (expr) != PTRMEM_CST) > + { > + error ("%qE is not a valid template argument for type %qT " > + "because it not a pointer-to-member of the form `&X::Y'", > + expr, type); > + return NULL_TREE; > + } The test has go in front of perform_qualification_conversions with an extra STRIP_NOPS. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37093