From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7683 invoked by alias); 21 Jan 2002 22:16:04 -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 7605 invoked by uid 71); 21 Jan 2002 22:16:02 -0000 Resent-Date: 21 Jan 2002 22:16:01 -0000 Resent-Message-ID: <20020121221601.7601.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, null_and_void@users.sourceforge.net Received:(qmail 6386 invoked by uid 61); 21 Jan 2002 22:14:28 -0000 Message-Id:<20020121221428.6379.qmail@sources.redhat.com> Date: Mon, 21 Jan 2002 14:16:00 -0000 From: null_and_void@users.sourceforge.net Reply-To: null_and_void@users.sourceforge.net To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/5447: GCC/G++ 3.0.3 will segfault given the following file. X-SW-Source: 2002-01/txt/msg00733.txt.bz2 List-Id: >Number: 5447 >Category: c++ >Synopsis: GCC/G++ 3.0.3 will segfault given the following file. >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Mon Jan 21 14:16:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Paul Varga >Release: 3.0.3 >Organization: >Environment: Linux 2.4.5, i686 (Althon TBird 900 Mhz). >Description: Causes G++ to segfault: seg3.cpp:1: Internal error: Segmentation fault >How-To-Repeat: Create a file named 'something.cpp' (it must be a C++ extension, not a C one). Fill the file with this code: // --- void someFunc(char *[][], int, int); int main(void) { return 0; } void someFunc(char *arr[][], int alpha, int beta) { } // --- Simply compile it using (for example): g++ -o abc something.cpp. If you use the gcc frontend to g++ it will segfault also. It will not segfault if it is a .c file. >Fix: Use 'char ***' instead of 'char *[][]'. Or use 'char *[][num]' instead of 'char *[][]'. >Release-Note: >Audit-Trail: >Unformatted: