From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 123942 invoked by alias); 26 Oct 2019 12:45:01 -0000 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 Received: (qmail 123880 invoked by uid 89); 26 Oct 2019 12:44:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=overdue, HContent-Transfer-Encoding:8bit X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 26 Oct 2019 12:44:57 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id x9QCipsW026559; Sat, 26 Oct 2019 07:44:51 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id x9QCioYB026558; Sat, 26 Oct 2019 07:44:50 -0500 Date: Sat, 26 Oct 2019 13:27:00 -0000 From: Segher Boessenkool To: Iain Sandoe Cc: Georg-Johann Lay , GCC Patches , nd , Wilco Dijkstra Subject: Re: [PATCH] PR85678: Change default to -fno-common Message-ID: <20191026124450.GX28442@gate.crashing.org> References: <5DB34788.5030309@gcc.gnu.org> <7710445A-F75A-43DD-AE9A-C3443CD4A1B3@sandoe.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7710445A-F75A-43DD-AE9A-C3443CD4A1B3@sandoe.co.uk> User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2019-10/txt/msg01888.txt.bz2 On Sat, Oct 26, 2019 at 12:21:15PM +0100, Iain Sandoe wrote: > Georg-Johann Lay wrote: > > Wilco Dijkstra schrieb: > >> GCC currently defaults to -fcommon. As discussed in the PR, this is an ancient > >> C feature which is not conforming with the latest C standards. On many targets > >> this means global variable accesses have a codesize and performance penalty. > >> This applies to C code only, C++ code is not affected by -fcommon. It is about > >> time to change the default. > >> OK for commit? > > > > IIRC using -fno-common might lead to some testsuit fallout because > > some optimizations / test cases are sensitive to -f[no-]common. > > So I wonder that no adjustments to test cases are needed? > > Two points here: > > (a) I actually agree with the idea to change the default I think everyone does, this has been long overdue. > (b) there will surely be testsuite fallout on Darwin, where common accesses are > mandated to be indirect in the ABI, where non-weak .data accesses are not > Thus code generated for Darwin will change for any test using variables that > are “common” and where the test does not already force -fno-common > > I’d expect fallout to be quite large - since there are plenty of testcases with uninit > gobals. We might want to make a test-run and see the size of the problem, but > preferably once the stage#1 submisison and gcc-7 release cycles are done. Yeah -- and if fallout is more than just testsuite, should it be postponed to GCC 11? And announced now, etc. But to find out we probably should flip the switch soon, see what happens, only flip it back if necessary. Segher