This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/30475] assert(int+100 > int) optimized away
- From: "felix-gcc at fefe dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Jan 2007 02:18:02 -0000
- Subject: [Bug c/30475] assert(int+100 > int) optimized away
- References: <bug-30475-3511@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #41 from felix-gcc at fefe dot de 2007-01-22 02:18 -------
So I tested some C++ vector code using at, in a desperate attempt to find ANY
case where this so called "optimization" actually produces faster code.
http://ptrace.fefe.de/vector2.C
$ gcc -O3 -o vector2 vector2.C
$ ./vector2
69859 cycles
$ gcc -O3 -o vector2 vector2.C -fwrapv
$ ./vector2
69606 cycles
$
so, not only is the different negligible, it also turns out that the
optimization made the code SLOWER. Now, let's see what the Intel compiler does
(I'm using 9.1.042):
$ icc64 -O3 -o vector2 vector2.C
$ ./vector2
50063 cycles
$
So, all this fuss you are making is about an optimization that actually makes
code slower, and the competition does not need foul language lawyer games like
this to still beat you by 28%. 28%!
You should be ashamed of yourself.
Why don't you get over the fact that this was a really bad decision, undo it,
and we will all live happily ever after.
Oh, and: If it really does not matter whether I keep reopening this bug, why do
you keep closing it? I will keep this bug open, so the world can see how you
broke gcc and are unable to let even facts as clear as these convince you to
see the error of your ways.
--
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