Re: gcc optimization changes results
- From: Joe Beanfish <joe@xxxxxxxxxx>
- Date: Mon, 07 Aug 2006 13:11:59 -0400
nirnimesh@xxxxxxxxx wrote:
Not to rain on your parade, but a bug in GCC is less likely than a bug
in your application.
Whereas I totally understand that the bug is more likely to be in my
program than in gcc (or g++), I want to figure if out. How do I
proceed. Also, with optimizations turned off, my program produces
correct results every time. With -O1 or -O2, it does not.
I compile my prog with: "g++ -Wall" and it produces no warnings.
Nirnimesh
Try using pragma to turn optimization off for only portions of your
program until it starts working again. Then you'll have a better
idea where the problem is.
Alternatively knowing in what way it's wrong and what bits of code
are involved in the wrong behavior would help. Then you could single
step through the code to see where it goes wrong.
.
- References:
- gcc optimization changes results
- From: nirnimesh
- Re: gcc optimization changes results
- From: Spoons
- Re: gcc optimization changes results
- From: nirnimesh
- gcc optimization changes results
- Prev by Date: Re: accessing internal h/w timers
- Next by Date: user-space hangs - followup
- Previous by thread: Re: gcc optimization changes results
- Next by thread: Re: gcc optimization changes results
- Index(es):