From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27140 invoked by alias); 2 Dec 2004 17:05:23 -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 27126 invoked from network); 2 Dec 2004 17:05:18 -0000 Received: from unknown (HELO Cantor.suse.de) (195.135.220.2) by sourceware.org with SMTP; 2 Dec 2004 17:05:18 -0000 Received: from extimap.suse.de (extimap.suse.de [195.135.220.6]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id 92BF5119E6E3; Thu, 2 Dec 2004 18:05:17 +0100 (CET) Received: from extimap.suse.de (extimap.suse.de [195.135.220.6]) by extimap.suse.de (Postfix) with ESMTP id 34953128D67; Thu, 2 Dec 2004 18:05:17 +0100 (CET) Message-ID: <425929.1102007117190.SLOX.WebMail.wwwrun@extimap.suse.de> Date: Thu, 02 Dec 2004 17:05:00 -0000 From: Steven Bosscher To: "Joseph S. Myers" Subject: Re: Compiler uses a lot of memory for large initialized arrays Cc: Ian Lance Taylor , mark@codesourcery.com, gcc@gcc.gnu.org In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Operating-System: Linux 2.4.21-251-smp i386 (JVM 1.3.1_04) Organization: SuSE Linux AG References: X-SW-Source: 2004-12/txt/msg00129.txt.bz2 On Dec 02, 2004 05:34 PM, Joseph S. Myers wrote: > 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. Ouch. Do we disable this if -std!=c99? Gr. Steven