Hi,
I have problem with error reported by C6000 compiler when compiling following code:
#define AVOID_BUG1
#include <boost/container/map.hpp>
#include <boost/container/vector.hpp>
#if !defined(AVOID_BUG1)
namespace bug1 {
struct no_operator { };
// this class allows implicit conversions and makes the following operator
// definition less-preferred than any other such operators that might be found
// via argument-dependent name lookup
struct any { template <class T> any(T const&); };
// when operator BOOST_TT_TRAIT_OP is not available, this one is used
no_operator operator && (const any&, const any&);
} // bug1
#endif
namespace cont = boost::container;
typedef cont::multimap<int,int> Map;
typedef Map::const_iterator T;
typedef cont::vector<T> V;
void f()
{
V v;
T t = T();
v.push_back(t);
}
I think it is compiler defect.
I reproduced this error with cgtools: 7.3.6 and 7.4.2. I am using CCSv5.2.0.00069, SYS/BIOS 6.33.4.39 and simulator C66xxSim.ccxml - C64x+ CPU Cycle Accurate Simulator, Little Endian.
Use case file bug1.cpp
Error message from compilers 7.3.6 and 7.4.2 - both the same.
**** Build of configuration Debug for project iff_test_sysbios ****
D:\Program_Files\ti\ccsv5\utils\bin\gmake -k externals/iff/bug1.obj
'Building file: ../externals/iff/bug1.cpp'
'Invoking: C6000 Compiler'
"D:/Program_Files/ti/ccsv5/tools/compiler/c6000_7.3.6/bin/cl6x" -mv64+ -g --exceptions --rtti --gcc --define=SYSBIOS --define=xdc_cfg__header__=Debug/configPkg/package/cfg/iff_test_sysbios_p64P.h --define=BOOST_GEOMETRY_NO_LEXICAL_CAST --include_path="D:/bogusapi/workspace/iff_test_sysbios/cfg" --include_path="D:/bogusapi/workspace/iff_test_sysbios/externals" --include_path="D:/bogusapi/workspace/iff_test_sysbios/externals/cz/proposal" --include_path="D:/Program_Files/ti/ccsv5/tools/compiler/c6000_7.3.6/include" --include_path="D:/bogusapi/workspace/iff_test_sysbios/externals/cz/extensions" --include_path="D:/boost/include/boost-1_50_0_ti" --diag_warning=225 --abi=coffabi --preproc_with_compile --preproc_dependency="externals/iff/bug1.pp" --obj_directory="externals/iff" --cmd_file="./configPkg/compiler.opt" "../externals/iff/bug1.cpp"
"D:/boost/include/boost-1_50_0_ti/boost/intrusive/detail/has_member_function_callable_with.hpp", line 88: error: invalid base class
detected during:
instantiation of class "boost::container::container_detail::has_member_function_named_max_size<Type>::Base [with Type=const std::allocator<T>]" at line 98
instantiation of class "boost::container::container_detail::has_member_function_named_max_size<Type> [with Type=const std::allocator<T>]" at line 342
instantiation of class "boost::container::container_detail::has_member_function_callable_with_max_size<Fun> [with Fun=const std::allocator<T>]" at line 246 of "D:/boost/include/boost-1_50_0_ti/boost/container/allocator_traits.hpp"
instantiation of "boost::container::allocator_traits<Alloc>::size_type boost::container::allocator_traits<Alloc>::max_size(const Alloc &) [with Alloc=std::allocator<T>]" at line 323 of "D:/boost/include/boost-1_50_0_ti/boost/container/vector.hpp"
instantiation of "boost::container::container_detail::vector_alloc_holder<A>::size_type boost::container::container_detail::vector_alloc_holder<A>::next_capacity(boost::container::container_detail::vector_alloc_holder<A>::size_type) const [with A=std::allocator<T>]" at line 1435 of "D:/boost/include/boost-1_50_0_ti/boost/container/vector.hpp"
[ 4 instantiation contexts not shown ]
instantiation of "void boost::container::vector<T, A>::insert(boost::container::vector<T, A>::const_iterator, boost::container::vector<T, A>::size_type, const T &) [with T=T, A=std::allocator<T>]" at line 1311 of "D:/boost/include/boost-1_50_0_ti/boost/container/vector.hpp"
instantiation of "boost::container::vector<T, A>::iterator boost::container::vector<T, A>::priv_insert(boost::container::vector<T, A>::const_iterator, const T &) [with T=T, A=std::allocator<T>]" at line 1152 of "D:/boost/include/boost-1_50_0_ti/boost/container/vector.hpp"
instantiation of "boost::enable_if_c<<expression>, boost::container::container_detail::vector_iterator<boost::container::allocator_traits<A>::pointer>>::type boost::container::vector<T, A>::insert(boost::container::vector<T, A>::const_iterator, const BOOST_MOVE_TEMPL_PARAM &) [with T=T, A=std::allocator<T>, BOOST_MOVE_TEMPL_PARAM=boost::container::container_detail::rbtree<int, std::pair<const int, int>, boost::container::container_detail::select1st<std::pair<const int, int>>, std::less<int>, std::allocator<std::pair<const int, int>>>::const_iterator]" at line 1337 of "D:/boost/include/boost-1_50_0_ti/boost/container/vector.hpp"
instantiation of "void boost::container::vector<T, A>::priv_push_back(const U &) [with T=T, A=std::allocator<T>, U=boost::container::container_detail::rbtree<int, std::pair<const int, int>, boost::container::container_detail::select1st<std::pair<const int, int>>, std::less<int>, std::allocator<std::pair<const int, int>>>::const_iterator]" at line 1031 of "D:/boost/include/boost-1_50_0_ti/boost/container/vector.hpp"
>> Compilation failure
instantiation of "void boost::container::vector<T, A>::push_back(T &) [with T=T, A=std::allocator<T>]"
1 error detected in the compilation of "../externals/iff/bug1.cpp".
gmake: *** [externals/iff/bug1.obj] Error 1
**** Build Finished ****
'Building file: ../externals/iff/bug1.cpp'
'Invoking: C6000 Compiler'
"D:/Program_Files/ti/ccsv5/tools/compiler/c6000_7.4.2/bin/cl6x" -mv64+ --abi=coffabi -g --include_path="D:/bogusapi/workspace/iff_test_sysbios/cfg" --include_path="D:/bogusapi/workspace/iff_test_sysbios/externals" --include_path="D:/bogusapi/workspace/iff_test_sysbios/externals/cz/proposal" --include_path="D:/Program_Files/ti/ccsv5/tools/compiler/c6000_7.4.2/include" --include_path="D:/bogusapi/workspace/iff_test_sysbios/externals/cz/extensions" --include_path="D:/boost/include/boost-1_50_0_ti" --exceptions --rtti --gcc --define=SYSBIOS --define=xdc_cfg__header__=Debug/configPkg/package/cfg/iff_test_sysbios_p64P.h --define=BOOST_GEOMETRY_NO_LEXICAL_CAST --diag_warning=225 --preproc_with_compile --preproc_dependency="externals/iff/bug1.pp" --obj_directory="externals/iff" --cmd_file="./configPkg/compiler.opt" "../externals/iff/bug1.cpp"
"D:/boost/include/boost-1_50_0_ti/boost/intrusive/detail/has_member_function_callable_with.hpp", line 88: error: invalid base class
detected during:
instantiation of class "boost::container::container_detail::has_member_function_named_max_size<Type>::Base [with Type=const std::allocator<T>]" at line 98
instantiation of class "boost::container::container_detail::has_member_function_named_max_size<Type> [with Type=const std::allocator<T>]" at line 342
instantiation of class "boost::container::container_detail::has_member_function_callable_with_max_size<Fun> [with Fun=const std::allocator<T>]" at line 246 of "D:/boost/include/boost-1_50_0_ti/boost/container/allocator_traits.hpp"
instantiation of "boost::container::allocator_traits<Alloc>::size_type boost::container::allocator_traits<Alloc>::max_size(const Alloc &) [with Alloc=std::allocator<T>]" at line 323 of "D:/boost/include/boost-1_50_0_ti/boost/container/vector.hpp"
instantiation of "boost::container::container_detail::vector_alloc_holder<A>::size_type boost::container::container_detail::vector_alloc_holder<A>::next_capacity(boost::container::container_detail::vector_alloc_holder<A>::size_type) const [with A=std::allocator<T>]" at line 1435 of "D:/boost/include/boost-1_50_0_ti/boost/container/vector.hpp"
[ 4 instantiation contexts not shown ]
instantiation of "void boost::container::vector<T, A>::insert(boost::container::vector<T, A>::const_iterator, boost::container::vector<T, A>::size_type, const T &) [with T=T, A=std::allocator<T>]" at line 1311 of "D:/boost/include/boost-1_50_0_ti/boost/container/vector.hpp"
instantiation of "boost::container::vector<T, A>::iterator boost::container::vector<T, A>::priv_insert(boost::container::vector<T, A>::const_iterator, const T &) [with T=T, A=std::allocator<T>]" at line 1152 of "D:/boost/include/boost-1_50_0_ti/boost/container/vector.hpp"
instantiation of "boost::enable_if_c<<expression>, boost::container::container_detail::vector_iterator<boost::container::allocator_traits<A>::pointer>>::type boost::container::vector<T, A>::insert(boost::container::vector<T, A>::const_iterator, const BOOST_MOVE_TEMPL_PARAM &) [with T=T, A=std::allocator<T>, BOOST_MOVE_TEMPL_PARAM=boost::container::container_detail::rbtree<int, std::pair<const int, int>, boost::container::container_detail::select1st<std::pair<const int, int>>, std::less<int>, std::allocator<std::pair<const int, int>>>::const_iterator]" at line 1337 of "D:/boost/include/boost-1_50_0_ti/boost/container/vector.hpp"
instantiation of "void boost::container::vector<T, A>::priv_push_back(const U &) [with T=T, A=std::allocator<T>, U=boost::container::container_detail::rbtree<int, std::pair<const int, int>, boost::container::container_detail::select1st<std::pair<const int, int>>, std::less<int>, std::allocator<std::pair<const int, int>>>::const_iterator]" at line 1031 of "D:/boost/include/boost-1_50_0_ti/boost/container/vector.hpp"
instantiation of "void boost::container::vector<T, A>::push_back(T &) [with T=T, A=std::allocator<T>]"
1 error detected in the compilation of "../externals/iff/bug1.cpp".
>> Compilation failure
gmake: *** [externals/iff/bug1.obj] Error 1
Regards.