This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11767] different code behaviour with -fprofile-arcs -ftest-coverage
- From: "lothar at xcerla dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Aug 2003 21:37:32 -0000
- Subject: [Bug c++/11767] different code behaviour with -fprofile-arcs -ftest-coverage
- References: <20030801203357.11767.lothar@xcerla.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11767
------- Additional Comments From lothar at xcerla dot com 2003-08-04 21:37 -------
I prepared an additional case, this time with unsigned long rather than double. This should
make clear that the bug is with -fprofile-arcs -ftest-coverage and not floating point related.
I will attach the preprocessed file like for the first case.
lothar@janus$ c++ -save-temps -DGCCTEST -fPIC -W -Wall -Wpointer-arith -Wno-uninitialized
-Woverloaded-virtual -march=pentiumpro -fPIC -fnon-call-exceptions -g -O0 -fstack-check -o
gcctest GccTest.cpp
GccTest.cpp: In function `int main(int, char**)':
GccTest.cpp:123: warning: unused parameter `int argc'
GccTest.cpp:123: warning: unused parameter `char**argv'
<~/workspace/XRS/src/cxx/utility/test>
lothar@janus$ ./gcctest
mc_isoValue=10000 msc_maxCurrencyID=9999
mc_isoValue > msc_maxCurrencyID=1
isGreater=1
hurray
mc_isoValue=10000 msc_maxCurrencyID=9999
mc_isoValue > msc_maxCurrencyID=1
isGreater=1
hurray
lothar@janus$ c++ -save-temps -DGCCTEST -fPIC -W -Wall -Wpointer-arith -Wno-uninitialized
-Woverloaded-virtual -march=pentiumpro -fPIC -fnon-call-exceptions -g -fprofile-arcs
-ftest-coverage -O0 -fstack-check -o gcctest GccTest.cpp
GccTest.cpp: In function `int main(int, char**)':
GccTest.cpp:123: warning: unused parameter `int argc'
GccTest.cpp:123: warning: unused parameter `char**argv'
<~/workspace/XRS/src/cxx/utility/test>
lothar@janus$ ./gcctest
mc_isoValue=10000 msc_maxCurrencyID=9999
mc_isoValue > msc_maxCurrencyID=1
isGreater=1
hurray
mc_isoValue=10000 msc_maxCurrencyID=9999
mc_isoValue > msc_maxCurrencyID=0
isGreater=0
uhuh