From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27421 invoked by alias); 19 Apr 2002 07:46:09 -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 27367 invoked by uid 71); 19 Apr 2002 07:46:04 -0000 Resent-Date: 19 Apr 2002 07:46:04 -0000 Resent-Message-ID: <20020419074604.27365.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, lodewijk_smit@yahoo.com Received:(qmail 24652 invoked from network); 19 Apr 2002 07:41:42 -0000 Received: from unknown (HELO utrhcs.cs.utwente.nl) (130.89.10.247) by sources.redhat.com with SMTP; 19 Apr 2002 07:41:42 -0000 Received: from loki.cs.utwente.nl (IDENT:root@loki.cs.utwente.nl [130.89.8.8]) by utrhcs.cs.utwente.nl (8.9.3/8.9.3) with ESMTP id JAA08959 for ; Fri, 19 Apr 2002 09:41:39 +0200 (MET DST) Received: (from smitl@localhost) by loki.cs.utwente.nl (8.11.6/8.11.2) id g3J7fe109546; Fri, 19 Apr 2002 09:41:40 +0200 Message-Id:<200204190741.g3J7fe109546@loki.cs.utwente.nl> Date: Fri, 19 Apr 2002 00:46:00 -0000 From: lodewijk_smit@yahoo.com Reply-To: lodewijk_smit@yahoo.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:3.113 Subject: c++/6371: bug with template functions X-SW-Source: 2002-04/txt/msg00970.txt.bz2 List-Id: >Number: 6371 >Category: c++ >Synopsis: g++ crashes with template function with wrong return type >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: ice-on-illegal-code >Submitter-Id: net >Arrival-Date: Fri Apr 19 00:46:02 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Lodewijk Smit >Release: 3.0.3 >Organization: University of Twente >Environment: System: Linux loki 2.4.9-31smp #1 SMP Tue Feb 26 06:55:00 EST 2002 i686 unknown Architecture: i686 host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: i686-pc-linux-gnu configured with: ./configure --prefix=/home/aid/smitl/linux >Description: The compiler crashes instead of reporting an error in the code for a template function that returns a wrong type. See code below. >How-To-Repeat: Compile the following piece of code: --------------start here------------- template T MaxS(T X, T Y) { } T MaxS(int X ,int Y) { } main() {}; --------------end here--------------- >Fix: Work around: Write correct code :-) >Release-Note: >Audit-Trail: >Unformatted: