Boost.Test - ICE on GCC4.1.0

Good <time-of-day>! GCC4.1.0 fails to compile Boost.Test with -fprofile-arcs or -ftest-coverage compiler options. I've traced compiler error to "void xml_report_formatter::test_unit_report_start( test_unit const& tu, std::ostream& ostr )" function. GCC on Windows just fails with an ICE. GCC4.1 on Linux finishes compilation successfully but fails to link the resulting executable with erorrs like this: =============================================================== /home/cyberax/FlexIDE/libs/boost/bin.v2/libs/test/build/gcc/debug/threading-mult i/libboost_unit_test_framework-gcc-mt-d-1_33.so.1.33.0: undefined reference to `global constructors keyed to _ZN5boost9unit_test97_GLOBAL__N__home_cyberax_FlexI DE_libs_boost_libs_test_src_results_collector.cpp_00000000_75CE510517results_col lectorE' =============================================================== Has anybody encountered this problem? PS: Is there any interest for GCOV (GNU Coverage tool) support in Boost.Build v2 for test coverage analysis? -- With respect, Alex Besogonov (cyberax@elewise.com)

GCC4.1.0 fails to compile Boost.Test with -fprofile-arcs or -ftest-coverage compiler options. I've traced compiler error to "void
What these parameters do?
xml_report_formatter::test_unit_report_start( test_unit const& tu, std::ostream& ostr )" function.
GCC on Windows just fails with an ICE. GCC4.1 on Linux finishes compilation successfully but fails to link the resulting executable with erorrs like this: =============================================================== /home/cyberax/FlexIDE/libs/boost/bin.v2/libs/test/build/gcc/debug/threading-mult i/libboost_unit_test_framework-gcc-mt-d-1_33.so.1.33.0: undefined reference to `global constructors keyed to _ZN5boost9unit_test97_GLOBAL__N__home_cyberax_FlexI DE_libs_boost_libs_test_src_results_collector.cpp_00000000_75CE510517results_col lectorE' ===============================================================
Could you demangle this symbol?
PS: Is there any interest for GCOV (GNU Coverage tool) support in Boost.Build v2 for test coverage analysis?
It would be interresting. Gennadiy

Gennadiy Rozental wrote:
GCC4.1.0 fails to compile Boost.Test with -fprofile-arcs or -ftest-coverage compiler options. I've traced compiler error to "void
GCC 4.1 hasn't been released, yet. So there may be some bugs still lurking in the compiler.
GCC on Windows just fails with an ICE.
You should report that one to the GCC people.
Could you demangle this symbol?
boost::unit_test::(anonymous namespace)::results_collector Regards, m Send instant messages to your online friends http://au.messenger.yahoo.com

Martin Wille wrote:
GCC 4.1 hasn't been released, yet. So there may be some bugs still lurking in the compiler. I know, but there are too many cool things in GCC to wait for its official release.
GCC on Windows just fails with an ICE. You should report that one to the GCC people. Yes, it is a bug in GCC. I've already fixed it and added a patch to GCC Bugzilla.
-- With respect, Alex Besogonov (cyberax@elewise.com)

Gennadiy Rozental wrote:
=============================================================== /home/cyberax/FlexIDE/libs/boost/bin.v2/libs/test/build/gcc/debug/threading-mult i/libboost_unit_test_framework-gcc-mt-d-1_33.so.1.33.0: undefined reference to `global constructors keyed to _ZN5boost9unit_test97_GLOBAL__N__home_cyberax_FlexI DE_libs_boost_libs_test_src_results_collector.cpp_00000000_75CE510517results_col lectorE' =============================================================== Could you demangle this symbol? c++filt gives "boost::unit_test::(anonymous namespace)::results_collector"
I think it's a problem in GCC, not in Boost, because GCC on Windows works without error if source files are located in the current directory. I suspect there's a problem with GCC's anonymous namespace handling.
PS: Is there any interest for GCOV (GNU Coverage tool) support in Boost.Build v2 for test coverage analysis? It would be interresting. Working on it...
-- With respect, Alex Besogonov (cyberax@elewise.com)
participants (3)
-
Alex Besogonov
-
Gennadiy Rozental
-
Martin Wille