From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26983 invoked by alias); 22 Mar 2002 07:46: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 26961 invoked by uid 71); 22 Mar 2002 07:46:02 -0000 Resent-Date: 22 Mar 2002 07:46:01 -0000 Resent-Message-ID: <20020322074601.26960.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, hezamu@tuug.org Received:(qmail 26436 invoked by uid 61); 22 Mar 2002 07:42:46 -0000 Message-Id:<20020322074246.26435.qmail@sources.redhat.com> Date: Thu, 21 Mar 2002 23:46:00 -0000 From: hezamu@tuug.org Reply-To: hezamu@tuug.org To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: middle-end/6033: Naming and returning a value from a void function causes an internal compiler error (g++) X-SW-Source: 2002-03/txt/msg00827.txt.bz2 List-Id: >Number: 6033 >Category: middle-end >Synopsis: Naming and returning a value from a void function causes an internal compiler error (g++) >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Thu Mar 21 23:46:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Henri Muurimaa >Release: g++ 2.95.2 >Organization: >Environment: Debian Linux 2.2r5 >Description: If I have a function returning void but name its return value, and have it return it, ie: void foo() return retval { return retval } I get a internal compiler error: foo.c: In function `void foo()': foo.c:3: Internal compiler error in `expand_expr', at expr.c:5771 Please submit a full bug report. See for instructions. This is probably a trivial bug (I haven't looked at the source), but the compiler asked me to report the bug, so here you are. >How-To-Repeat: Type the trivial example function shown in the bug description to a file, and try to compile it with g++ >Fix: Naming a void function's return value is obviously a stupid mistake from the coder's part, so to avoid the problem, don't do stupid mistakes :) >Release-Note: >Audit-Trail: >Unformatted: