public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* RE: Weird optimization bug...?
@ 2004-06-03 19:13 lrtaylor
  0 siblings, 0 replies; 15+ messages in thread
From: lrtaylor @ 2004-06-03 19:13 UTC (permalink / raw)
  To: adruab; +Cc: gcc-help

If not a buffer overrun, perhaps a buffer/variable initialization (or
lack thereof) issue?  Where the variable ends up in memory could affect
whether or not things work the way you expect, and I suppose that
optimization changes could affect that.

Just a thought.

Thanks,
Lyle


-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On
Behalf Of Adrian Bentley
Sent: Thursday, June 03, 2004 1:11 PM
To: Eljay Love-Jensen
Cc: gcc-help@gcc.gnu.org
Subject: Re: Weird optimization bug...?

Sorry, I probably wasn't clear.  I was just referring to why I didn't
think it was a buffer overrun.  It makes perfect sense why it would
change things with the optimizer involved :) (thought perhaps I am
missing something wrt the buffer overrun...).

Thanks for the pointers on the assembly generation.  I'm having some
trouble building with those options, so I'll get back to you when I've
figured it out (or hit a brick wall :P).

Thanks again,
Adruab > Adrian Bentley

On Thu, 2004-06-03 at 11:36, Eljay Love-Jensen wrote:
> Hi Adruab.
> 
>  >However, if that was the case, inserting a random function into the
code 
> certain shouldn't fix the problem :P.
> 
> Inserting a random function into the code can affect the optimizer,
which 
> can mask the problem.
> 
> I recommend taking a look at the assembly file to see what's different

> between having and not having the extra function present, in the
optimized 
> code.
> 
> You can use the "-save-temps" to keep the assembly file around, and 
> "-fverbose-asm" for extra blather.
> 
> HTH,
> --Eljay
> 
> 
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Weird optimization bug...?
@ 2004-06-02 20:24 Adrian Bentley
  2004-06-03 11:26 ` Eljay Love-Jensen
  0 siblings, 1 reply; 15+ messages in thread
From: Adrian Bentley @ 2004-06-02 20:24 UTC (permalink / raw)
  To: gcc-help

I have this crash bug in a templatized 2d blurring function.  It does
not occur in debug mode and if I put a print statement in the loop to
tell me what iteration it is on, it does not occur either.  I cannot see
any reason it seg faults when looking at dumped core or using gdb
manually, both using debug info + optimizations.  It seems like an
optimization issue (i.e. when I force the print statement it doesn't do
the optimization that borks it...).

I just upgraded to gcc 3.3.2 (most recent "stable" version on gentoo)
and have been trying to get a company project to build correctly.

My first inclination is to upgrade to the lastest "unstable" gcc version
on portage (3.3.3 I think).

Any suggestions?
Adruab

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2004-06-06 22:23 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-03 19:13 Weird optimization bug...? lrtaylor
  -- strict thread matches above, loose matches on Subject: below --
2004-06-02 20:24 Adrian Bentley
2004-06-03 11:26 ` Eljay Love-Jensen
2004-06-03 17:24   ` Adrian Bentley
2004-06-03 18:37     ` Eljay Love-Jensen
2004-06-03 19:11       ` Adrian Bentley
2004-06-03 21:17       ` Adrian Bentley
2004-06-03 23:06       ` Adrian Bentley
2004-06-04  3:00         ` Ian Lance Taylor
2004-06-05 19:09           ` Adrian Bentley
2004-06-05 23:31             ` Ian Lance Taylor
2004-06-06  0:47             ` Ken Foskey
2004-06-05 20:21           ` Adrian Bentley
     [not found]             ` <m3aczh4m55.fsf@gossamer.airs.com>
2004-06-06 16:44               ` Adrian Bentley
2004-06-06 22:23                 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).