From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4660 invoked by alias); 1 Jul 2006 02:35:10 -0000 Received: (qmail 4647 invoked by uid 22791); 1 Jul 2006 02:35:09 -0000 X-Spam-Check-By: sourceware.org Received: from out3.smtp.messagingengine.com (HELO out3.smtp.messagingengine.com) (66.111.4.27) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 01 Jul 2006 02:35:07 +0000 Received: from frontend3.internal (frontend3.internal [10.202.2.152]) by frontend1.messagingengine.com (Postfix) with ESMTP id AB080D89F8A for ; Fri, 30 Jun 2006 22:35:04 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by frontend3.internal (MEProxy); Fri, 30 Jun 2006 22:35:07 -0400 Received: from [192.168.1.102] (S010600065bbba392.vc.shawcable.net [24.84.52.26]) by mail.messagingengine.com (Postfix) with ESMTP id 5706E71B1 for ; Fri, 30 Jun 2006 22:35:05 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v752.2) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; format=flowed To: gcc-help@gcc.gnu.org From: Michael P Friedlander Subject: Flags -g and -O give very different results Date: Sat, 01 Jul 2006 02:35:00 -0000 X-Mailer: Apple Mail (2.752.2) X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2006-07/txt/msg00000.txt.bz2 Hi Folks, The behavior of a numerical code I'm working on varies drastically depending on whether I've compiled it with the -g or -O flags. The code's behavior under -g is much more stable, and I'm wondering if the -O flag is exposing a bug that I need to fix. Are there some gcc flags that I should try that might guide me in finding the problem? (I've already tried the obvious -Wall which gives no warnings.) In case it helps, I'm using both gcc 4.1.0 (SUSE Linux) and on gcc 4.0.1 (Mac PPC) which give similar behavior. Thanks! --Michael