From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 13111 invoked from network); 12 Oct 2020 09:40:07 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 12 Oct 2020 09:40:07 -0000 Received: (qmail 5150 invoked by uid 550); 12 Oct 2020 09:40:00 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 5132 invoked from network); 12 Oct 2020 09:40:00 -0000 Date: Mon, 12 Oct 2020 11:39:47 +0200 From: Szabolcs Nagy To: Rich Felker Cc: "joao@overdrivepizza.com" , musl@lists.openwall.com Message-ID: <20201012093947.GP2947641@port70.net> Mail-Followup-To: Rich Felker , "joao@overdrivepizza.com" , musl@lists.openwall.com References: <7a9c-5f80e100-115-af27520@104527809> <20201009231000.GB17637@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201009231000.GB17637@brightrain.aerifal.cx> Subject: Re: [musl] -frounding-math breaking src/math/acosf.c * Rich Felker [2020-10-09 19:10:00 -0400]: > On Sat, Oct 10, 2020 at 12:16:13AM +0200, joao@overdrivepizza.com wrote: > > Hi, > > > > I just noticed that the upstream LLVM is no longer capable of > > compiling musl 1.2.0 (and possibly more recent versions too) when > > -frounding-math is in use. I bisected the LLVM commit to > > https://reviews.llvm.org/D87822, and pointed the problem there. > > > > Just reporting in case someone else also has issues with this. > > > > Best, > > Joao. > > Thanks. This probably needs to be reported as aa bug against LLVM (or > clang?) rather than just a comment on the review so that it's tracked > as such. It seems they've erroneously made it treat static > initializers as non-constant-expressions rather than evaluating them > statically in the default rounding mode per the spec. const expressions should work as described in http://port70.net/~nsz/c/c11/n1570.html#F.8.4 but it seems clang handles literals that don't need conversion: float x = 0.1f; // works float y = 0.1; // fails we may want to fix this anyway in musl to always use the right type of literal (then it's clear that there is no double rounding).