From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8921 invoked by alias); 1 May 2005 19:40:56 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 8908 invoked by uid 48); 1 May 2005 19:40:53 -0000 Date: Sun, 01 May 2005 19:40:00 -0000 Message-ID: <20050501194053.8907.qmail@sourceware.org> From: "pinskia at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050501191141.21322.fastsnip-gcc@yahoo.com> References: <20050501191141.21322.fastsnip-gcc@yahoo.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c/21322] O2 and O3 memory access error - compiled program - incorrect debug output X-Bugzilla-Reason: CC X-SW-Source: 2005-05/txt/msg00161.txt.bz2 List-Id: ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-01 19:40 ------- (In reply to comment #5) > Subject: Re: O2 and O3 memory access error - compiled program - incorrect debug output > > On Sunday 01 May 2005 15:19, you wrote: > > ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-01 > > 19:19 ------- Also can you look to see you have any warnings with -W -Wall? > > The warnings about unsigned vs signed were there before just enabled with > > -pedantic. > > > > Also does -fno-strict-aliasing help if so this might not be a bug in GCC > > but your code. > > Compiled with the above flag as you suggested - no change - I still get a > memory access error using "-O3" optiomization. > > Will try the "-W -Wall" flags top see what that produces and let you know. > > Terry Hmm, try -O1 -funit-at-a-time also make sure that you are not going past an array bounds. Also make sure that you are not invoking undefined behavior. I get a lot of warnings about uninitialized variables like so: awkpcmp.c: In function 'c_pop': awkpcmp.c:57: warning: 'R_Token' may be used uninitialized in this function awkpcmp.c: In function 'c_primary_expr': awkpcmp.c:159: warning: 'arg2' may be used uninitialized in this function awkpcmp.c:158: warning: 'arg1' may be used uninitialized in this function awkpcmp.c: In function 'c_statement': awkpcmp.c:1122: warning: 'Last_Token' may be used uninitialized in this function awkpcmp.c: In function 'set_user_fun': awkpcmp.c:1789: warning: 'name' may be used uninitialized in this function so you might just be invoking undefined. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21322