From owner-freebsd-hackers Thu Apr 26 6:45:31 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from smtpproxy2.mitre.org (smtpproxy2.mitre.org [128.29.154.90]) by hub.freebsd.org (Postfix) with ESMTP id 568F537B423 for ; Thu, 26 Apr 2001 06:45:28 -0700 (PDT) (envelope-from jandrese@mitre.org) Received: from avsrv2.mitre.org (avsrv2.mitre.org [128.29.154.4]) by smtpproxy2.mitre.org (8.9.3/8.9.3) with ESMTP id JAA13737; Thu, 26 Apr 2001 09:44:39 -0400 (EDT) Received: from MAILHUB2 (mailhub2.mitre.org [129.83.221.18]) by smtpsrv2.mitre.org (8.9.3/8.9.3) with ESMTP id JAA09048; Thu, 26 Apr 2001 09:44:38 -0400 (EDT) Received: from dhcp-105-232.mitre.org (128.29.105.232) by mailhub2.mitre.org with SMTP id 6461375; Thu, 26 Apr 2001 09:44:36 -0400 Message-ID: <3AE82644.50ED4A0@mitre.org> Date: Thu, 26 Apr 2001 09:44:36 -0400 From: Jason Andresen Organization: The MITRE Corporation X-Mailer: Mozilla 4.75 [en]C-20000818M (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Dag-Erling Smorgrav Cc: hackers@freebsd.org Subject: Re: gcc -O bug References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Dag-Erling Smorgrav wrote: > > I ran into this bug while analyzing a customer's logs to determine the > best time of day for an upgrade. The original script was in Perl, but > I rewrote it in C because it was too slow. The C version produces > incorrect results when compiled with -O. Note that the log starts at > 16:27. > > The warning about "time" being possibly uninitialized is safe to > ignore; this can only happen if the log is empty. > > The C source and a truncated log that reproduces the bug are attached > at the end of this message. Er, isn't this the kind of problem the GCC folks are more likly to be able to fix? At least in GCC 2.9.5 (not the latest mind you) this problem still exists. I'm sure the GNU project would love to hear about this bug, especially since it happens at such a low -O level (people expect bugs with -O2 or -O3, but -O bugs can be surprising to some). To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message