This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Question on -fbounds-check


"Tim Prince" <tprince@computer.org> writes:

> Am I correct in believing that -fbounds-check disables certain other
> (possibly buggy) optimizations, including -funroll-loops?  I notice that
> bugs associated with -funroll-loops (in gcc-2.96 snapshots) disappear
> when -fbounds-check is invoked.

Most likely this is just the loop optimizer deciding that unrolling
the loop is too hard with the extra bounds-checking code.

> As a slight digression, should it be possible to step code and examine
> loop counters under gdb, when code  has been compiled
> with -funroll-loops?  Does the answer differ between gcc and g77?

Step code, yes.  Examine loop counters, probably not, since you may
have more than one of them.
-- 
- Geoffrey Keating <geoffk@cygnus.com>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]