From jmallett@FreeBSD.org  Thu Mar 14 08:05:54 2002
Return-Path: <jmallett@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP
	id 3189537B402; Thu, 14 Mar 2002 08:05:54 -0800 (PST)
Received: (from jmallett@localhost)
	by freefall.freebsd.org (8.11.6/8.11.6) id g2EG5r236563;
	Thu, 14 Mar 2002 08:05:53 -0800 (PST)
	(envelope-from jmallett)
Message-Id: <200203141605.g2EG5r236563@freefall.freebsd.org>
Date: Thu, 14 Mar 2002 08:05:53 -0800 (PST)
From: "J. Mallett" <jmallett@freebsd.org>
Reply-To: "J. Mallett" <jmallett@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: obrien@freebsd.org
Subject: GCC dies allocating arrays of (LONG_MAX/2)-1 size
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         35892
>Category:       gnu
>Synopsis:       GCC dies allocating arrays of (LONG_MAX/2)-1 size
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 14 08:10:01 PST 2002
>Closed-Date:    Mon Mar 18 13:39:08 PST 2002
>Last-Modified:  Mon Mar 18 13:39:08 PST 2002
>Originator:     J. Mallett
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD Aphex.NewGold.NET 5.0-CURRENT FreeBSD 5.0-CURRENT #1: Tue Mar 12 10:09:28 GMT 2002 jmallett@Aphex.NewGold.NET:/vmunix.build i386
GCC: gcc version 2.95.3 20010315 (release)
>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.

	Here is the error:
		bar.c: In function `main':
		bar.c:6: 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.

	Note that I decided to send-pr here first, as I am unable to check
	right now whether this is FreeBSD-specific.

>How-To-Repeat:
	cat > foo.c <<_EOF_
#include <machine/limits.h>
int main(int argc, char *argv[])
{
  long array[(LONG_MAX/2)-1];
  return (0);
}
_EOF_
	cc foo.c
>Fix:
	Unaware of one at present.


>Release-Note:
>Audit-Trail:

From: Gregory Bond <gnb@itga.com.au>
To: "J. Mallett" <jmallett@FreeBSD.ORG>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG, obrien@FreeBSD.ORG
Subject: Re: gnu/35892: GCC dies allocating arrays of (LONG_MAX/2)-1 size 
Date: Fri, 15 Mar 2002 10:07:32 +1100

 This also coredumps on Solaris (gcc version 2.95.3 20010315 (release)) so it
 almost certainly a gcc bug not a FreeBSD bug.  Please report it the gcc 
 maintainers (see http://gcc.gnu.org/ for contact details.)
 
State-Changed-From-To: open->closed 
State-Changed-By: obrien 
State-Changed-When: Mon Mar 18 13:38:42 PST 2002 
State-Changed-Why:  
Not a FreeBSD-specific issue. PR for a purely GCC bug, w/no patch to fix. 

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