From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30179 invoked by alias); 7 Jul 2002 06:56:03 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 30133 invoked by uid 71); 7 Jul 2002 06:56:01 -0000 Resent-Date: 7 Jul 2002 06:56:01 -0000 Resent-Message-ID: <20020707065601.30131.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, ndry@mdcplus.com Received: (qmail 28881 invoked by uid 61); 7 Jul 2002 06:52:43 -0000 Message-Id: <20020707065243.28880.qmail@sources.redhat.com> Date: Sat, 06 Jul 2002 23:56:00 -0000 From: ndry@mdcplus.com Reply-To: ndry@mdcplus.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/7228: ICE when using member template and template function X-SW-Source: 2002-07/txt/msg00231.txt.bz2 List-Id: >Number: 7228 >Category: c++ >Synopsis: ICE when using member template and template function >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: ice-on-legal-code >Submitter-Id: net >Arrival-Date: Sat Jul 06 23:56:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: ndry@mdcplus.com >Release: 3.1.1pr and 3.0.4 >Organization: >Environment: >Description: The following code crushes gcc 3.1.1 and 3.0.4 (but not 2.95.4). ----------------------- #include template struct S { enum {I = N}; template struct rebind { typedef S Type; }; }; template void f(S& s, T& t) { typename S::rebind::Type ss; std::cout << ss.I << std::endl; } int main(){ S<0> s; S<1> t; f(s,t); } ------------------ $ g++ test.cc test.cc: In function `void f(S&, T&) [with S = S<0>, T = S<1>]': test.cc:21: instantiated from here test.cc:14: internal error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. >How-To-Repeat: Compile the above. >Fix: >Release-Note: >Audit-Trail: >Unformatted: