From keramida@freebsd.org  Sat Mar 16 05:52:16 2002
Return-Path: <keramida@freebsd.org>
Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5])
	by hub.freebsd.org (Postfix) with ESMTP
	id 922DA37B400; Sat, 16 Mar 2002 05:52:15 -0800 (PST)
Received: from hades.hell.gr (patr530-a059.otenet.gr [212.205.215.59])
	by mailsrv.otenet.gr (8.12.2/8.12.2) with ESMTP id g2GDqAcn024993;
	Sat, 16 Mar 2002 15:52:11 +0200 (EET)
Received: from hades.hell.gr (hades [127.0.0.1])
	by hades.hell.gr (8.12.2/8.12.2) with ESMTP id g2GDqlo7036547;
	Sat, 16 Mar 2002 15:52:50 +0200 (EET)
	(envelope-from keramida@freebsd.org)
Received: (from charon@localhost)
	by hades.hell.gr (8.12.2/8.12.2/Submit) id g2G4qdoF034495;
	Sat, 16 Mar 2002 06:52:39 +0200 (EET)
	(envelope-from keramida@freebsd.org)
Message-Id: <20020316045236.GA34462@hades.hell.gr>
Date: Sat, 16 Mar 2002 06:52:38 +0200
From: Giorgos Keramidas <keramida@freebsd.org>
To: "J. Mallett" <jmallett@freebsd.org>
Cc: bug-followup@freebsd.org, obrien@freebsd.org
In-Reply-To: <200203141605.g2EG5r236563@freefall.freebsd.org>
Subject: Re: gnu/35892: GCC dies allocating arrays of (LONG_MAX/2)-1 size
References: <200203141605.g2EG5r236563@freefall.freebsd.org>

>Number:         35979
>Category:       gnu
>Synopsis:       Re: gnu/35892: GCC dies allocating arrays of (LONG_MAX/2)-1 size
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 16 06:00:05 PST 2002
>Closed-Date:    Tue Mar 19 02:07:21 PST 2002
>Last-Modified:  Thu Oct 07 18:17:13 GMT 2004
>Originator:     
>Release:        
>Organization:
>Environment:
>Description:
 On 2002-03-14 08:05, J. Mallett wrote:
 > >Description:
 > 	When trying to allocate an array of longs on the stack of size
 > 	(LONG_MAX/2)-1 [and indeed several other smaller sizes, I haven't
 > 	tried to see the minimum to trigger the ice], GCC errors in the
 > 	function assign_stack_temp_for_type.
 
 Seems like a bug to me :(
 I tried to test the following program with different values of FOO.
 
     #ifndef FOO
     #define FOO 1
     #endif
 
     int main(int argc, char *argv[])
     {
 	    long array[(FOO) * 1024 * 1024];
 	    return (0);
     }
 
 The following results will probably prove helpful in tracking this down.
 What puzzles me is why GCC would detect a 'very large array' for FOO=1024
 but fail to do so for FOO=1023.
 
     hades:~$ cc -DFOO=511 foo.c
 
     hades:~$ cc -DFOO=512 foo.c
     foo.c: In function `main':
     foo.c:9: Internal compiler error in `assign_stack_temp_for_type', at
     function.c:940
     Please submit a full bug report.
     See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
 
     hades:~$ cc -DFOO=1023 foo.c
     foo.c: In function `main':
     foo.c:9: Internal compiler error in `assign_stack_temp_for_type', at
     function.c:940
     Please submit a full bug report.
     See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
 
     hades:~$ cc -DFOO=1024 foo.c
     foo.c: In function `main':
     foo.c:9: size of array `array' is too large
 
 Giorgos.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: keramida 
State-Changed-When: Tue Mar 19 02:06:43 PST 2002 
State-Changed-Why:  
Misfiled followup to PR 35892. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=35979 
>Unformatted:
