From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25347 invoked by alias); 2 Dec 2004 17:03:31 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 25325 invoked from network); 2 Dec 2004 17:03:27 -0000 Received: from unknown (HELO yosemite.airs.com) (209.128.65.135) by sourceware.org with SMTP; 2 Dec 2004 17:03:27 -0000 Received: (qmail 21178 invoked by uid 10); 2 Dec 2004 17:03:26 -0000 Received: (qmail 5691 invoked by uid 500); 2 Dec 2004 17:03:18 -0000 From: Ian Lance Taylor To: "Joseph S. Myers" Cc: mark@codesourcery.com, gcc@gcc.gnu.org Subject: Re: Compiler uses a lot of memory for large initialized arrays References: Date: Thu, 02 Dec 2004 17:03:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-12/txt/msg00128.txt.bz2 "Joseph S. Myers" writes: > On Thu, 2 Dec 2004, Ian Lance Taylor wrote: > > > This test case works fine with 2.95.3. Looking into the patches I > > came across this note from you from four years ago: > > http://gcc.gnu.org/ml/gcc-patches/2000-10/msg00937.html > > And hopefully you came across the November part of the thread as well: C99 > designated initializers allow > > int i[10000000] = { 0, 1, 2, 3, 4, 5, /* ... */ > 9999998, 9999999, [0] = -1 }; > > which stops optimizing in the simplest way by writing out initializers to > the assembler output before the whole initializer has been parsed. Oh, ick. Ian