[Bug c/30475] assert(int+100 > int) optimized away

felix-gcc at fefe dot de gcc-bugzilla@gcc.gnu.org
Thu Jan 18 15:20:00 GMT 2007



------- Comment #27 from felix-gcc at fefe dot de  2007-01-18 15:20 -------
Oh, so C++ code using vector gets faster, you say?  Let's see...

This is vector.C from http://ptrace.fefe.de/vector.C

It does some assignments to a vector.  It runs the loop 10 times and takes the
minimum cycle counter.

  $ g++ -O2 -o vector vector.C
  $ ./vector
  20724 cycles
  $ g++ -O2 -o vector vector.C -fwrapv
  $ ./vector
  20724 cycles
  $

And AGAIN you are proven wrong by the facts.  Do you have some more "proof"
where this came from?

Man, this is ridiculous.  Just back out that optimization and I'll shut up.


-- 

felix-gcc at fefe dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|WONTFIX                     |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30475



More information about the Gcc-bugs mailing list