public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* foptimize_strlen
@ 2014-02-10  8:56 Vikas Salar
  0 siblings, 0 replies; only message in thread
From: Vikas Salar @ 2014-02-10  8:56 UTC (permalink / raw)
  To: gcc-help

Hi,

I'm getting one valgrind error of "Invalid read of size 4" with
executable build by g++481 with -O2 option.
Error is not reported if binary is build with g++481 with -O2 and
-fno-builtin-strlen on command line.
Though I think it's a valgrind false positive and my suspect g++481
optimization for this error is -foptimize-strlen, but error is not
reported if
binary is build with -O1 and -foptimize-strlen on command line.

My queries are:
does g++481 activates strlen optimization when -foptimize-strlen is
enables explicitly?
Is there any difference between fno-optimize-strlen and -fno-builtin-strlen?
Why error is reported with "-O2" and not with "-O1 -foptimize-strlen"?

Thanks,
Vikas

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-02-10  8:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-10  8:56 foptimize_strlen Vikas Salar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).