This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/25791] -O2 execution fails, -O and -g work
- From: "ebotcazou at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Jan 2006 13:31:24 -0000
- Subject: [Bug rtl-optimization/25791] -O2 execution fails, -O and -g work
- References: <bug-25791-12018@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #12 from ebotcazou at gcc dot gnu dot org 2006-01-18 13:31 -------
> I rebuilt with -O2 AND -g, and got the following trace. Notice the while-loop
> in nscan, statements 1141 thru 1147 are four single statements. The "next"
> trace by gdb shows them occuring multiple times. This should NOT be
> happening. This may be another BUG, this time with 'gdb'.
That is expected because -O2 seriously breaks the source code apart and
reorders things. Use "nexti" in that case.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25791