This is the mail archive of the gcc-help@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]
Other format: [Raw text]

foptimize_strlen


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


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