From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16731 invoked by alias); 16 Mar 2010 09:03:50 -0000 Received: (qmail 16507 invoked by uid 22791); 16 Mar 2010 09:03:48 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (212.99.106.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 16 Mar 2010 09:03:44 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 22E0BCB021D; Tue, 16 Mar 2010 10:03:41 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jcLW3HtjWeUW; Tue, 16 Mar 2010 10:03:41 +0100 (CET) Received: from [192.168.1.2] (91-165-5-96.rev.libertysurf.net [91.165.5.96]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id F242FCB01E5; Tue, 16 Mar 2010 10:03:40 +0100 (CET) From: Eric Botcazou To: Duncan Sands Subject: Re: [Ada] Delete bogus use of flag_zero_initialized_in_bss Date: Tue, 16 Mar 2010 09:06:00 -0000 User-Agent: KMail/1.9.9 Cc: gcc-patches@gcc.gnu.org References: <4B9F3DA9.5020204@free.fr> In-Reply-To: <4B9F3DA9.5020204@free.fr> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <201003161003.14729.ebotcazou@adacore.com> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2010-03/txt/msg00648.txt.bz2 > The Ada front-end seems to think that clearing flag_zero_initialized_in_bss > means that global variables without an explicit initializer will be > considered to be uninitialized rather than zero initialized by the rest of > the compiler. No, it doesn't, you misunderstood. > Rather than specifying whether the global will be zero initialized or not, > it specifies by what method it will be zero initialized: whether by placing > in the BSS section or by outputting an explicit block of zeros. Yes, that's precisely why the flag needs to be cleared: uninitialized really means uninitialized in Ada so the BSS section isn't guaranteed to be zero-ed at startup for a pure Ada program. -- Eric Botcazou