Expression and Meta Templates Problem using C++ (Wrong results)

Olaf Petzold opetzold@wit.regiocom.net
Wed Sep 17 07:38:00 GMT 2003


Hello Jan,

thank you for your answer. The attached file uses (depends on define)
dynamic allocated memory or static arrays as before. valgrind shows some
"Invalid read of size 8" (see comments on the lines). The interesting
behavior is by defined TVMET_RVO_BUG_WO_STATIC_TEMP, where static temps are
used for evaluating inside the prod() function - there are no  errors found
by valgrind! These looks for me as wrong code produced by gcc. Unfortunally
I'm not able to understand the asm code produced.

It doesn't seems to be a problem with the FPU - the same with long too.

Regards
Olaf


----- Original Message ----- 
From: "Jan Reimers" <janr@molienergy.com>
To: "'Olaf Petzold'" <opetzold@wit.regiocom.net>
Sent: Tuesday, September 16, 2003 4:58 PM
Subject: RE: Expression and Meta Templates Problem using C++ (Wrong results)


: Olaf,
: You may be right, but put try it as is first in case it does pick up reads
: on un-initialialized static memory.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: rvo_bug.cc
Type: application/octet-stream
Size: 12608 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20030917/d777b6db/attachment.obj>


More information about the Gcc mailing list