From owner-freebsd-hackers@freebsd.org Thu Jan 14 11:25:34 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 465174DDF68 for ; Thu, 14 Jan 2021 11:25:34 +0000 (UTC) (envelope-from thierry@pompo.net) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4DGhnV0lnyz3hkb for ; Thu, 14 Jan 2021 11:25:34 +0000 (UTC) (envelope-from thierry@pompo.net) Received: by mailman.nyi.freebsd.org (Postfix) id 19E464DE31F; Thu, 14 Jan 2021 11:25:34 +0000 (UTC) Delivered-To: hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 19AB34DE057 for ; Thu, 14 Jan 2021 11:25:34 +0000 (UTC) (envelope-from thierry@pompo.net) Received: from edna.lautre.net (edna.lautre.net [80.67.160.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "lautre.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGhnT1LJjz3htb for ; Thu, 14 Jan 2021 11:25:32 +0000 (UTC) (envelope-from thierry@pompo.net) Received: from graf.pompo.net (graf.pompo.net [78.225.128.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by edna.lautre.net (Postfix) with ESMTPSA id 08A8B11C55E for ; Thu, 14 Jan 2021 12:25:24 +0100 (CET) Received: by graf.pompo.net (Postfix, from userid 1001) id EE8C8A2CCD7; Thu, 14 Jan 2021 12:25:23 +0100 (CET) Date: Thu, 14 Jan 2021 12:25:23 +0100 From: Thierry Thomas To: FreeBSD Hackerz Subject: Some fun with -O2 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Operating-System: FreeBSD 12.2-STABLE amd64 Organization: Kabbale Eros X-Face: (hRbQnK~Pt7$ct`!fupO(`y_WL4^-Iwn4@ly-.,[4xC4xc; y=\ipKMNm<1J>lv@PP~7Z<.tKjAnXLs: X-PGP: 0xF1C516B3C8359753 X-Rspamd-Queue-Id: 4DGhnT1LJjz3htb X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of thierry@pompo.net designates 80.67.160.88 as permitted sender) smtp.mailfrom=thierry@pompo.net X-Spamd-Result: default: False [-0.67 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; HAS_ORG_HEADER(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.67)[-0.673]; FORGED_SENDER(0.30)[thierry@freebsd.org,thierry@pompo.net]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[80.67.160.88:from]; ASN(0.00)[asn:20766, ipnet:80.67.160.0/19, country:FR]; R_DKIM_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[thierry@freebsd.org,thierry@pompo.net]; TO_DOM_EQ_FROM_DOM(0.00)[]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[thierry]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[hackers@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[80.67.160.88:from:127.0.2.255]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 11:25:34 -0000 Letīs check a small C program, check_mktime.c, fetchable from . $CC -o check_mktime -O2 check_mktime.c ./check_mktime It is OK with clang90. It loops forever with gcc9, gcc10, clang10 and clang11, but OK without -O2. It is part of the configure script of ports/math/oleo, and I guess that the same part could be found in other configure scripts. Note a similar program is part of glibc: see . Regards. -- Th. Thomas.