EGCS 1.1.1 overzealous optimization on SPARC/Solaris for lmbench lat_mem_rd.c
Mike Stump
mrs@wrs.com
Sun Feb 28 23:30:00 GMT 1999
> Date: Thu, 11 Feb 1999 17:03:11 -0800 (PST)
> From: David G Hough at validgh <validgh@validgh.com>
> lat_mem_rd.c is a program to determine memory latency. For every
> gcc version I can readily obtain, back to at least 2.6.3, the
> critical timing loop is completely optimized away at -O3. Is that
> legitimate?
I don't see why not. Maybe you actually mean to use p at the end?
Try giving stop an argument, and moving stop to the _end_ of the file
so that it cannot be inlined.
I think it speaks well of gcc that it can optimize this horrible mess
down for you. :-)
More information about the Gcc-bugs
mailing list