copasi / copasi-dependencies

Collection of OpenSource libraries to simplify COPASI build
7 stars 3 forks source link

nativejit fails to compile on fedora #14

Open fbergmann opened 11 months ago

fbergmann commented 11 months ago

I found the following compile error:

/usr/bin/c++  -I/io/copasi-dependencies/src/NativeJIT/inc -msse4.2 -std=gnu++11 -Wall -Wextra -Werror -Wold-style-cast -fstrict-aliasing -Wstrict-aliasing -Wno-type-limits -Wno-noexcept-type -fPIC -fPIC -O3 -DNDEBUG -fPIC -msse4.2 -MD -MT src/NativeJIT/CMakeFiles/NativeJIT.dir/ExpressionTree.cpp.o -MF src/NativeJIT/CMakeFiles/NativeJIT.dir/ExpressionTree.cpp.o.d -o src/NativeJIT/CMakeFiles/NativeJIT.dir/ExpressionTree.cpp.o -c /io/copasi-dependencies/src/NativeJIT/src/NativeJIT/ExpressionTree.cpp
In file included from /io/copasi-dependencies/src/NativeJIT/inc/NativeJIT/ExpressionTreeDecls.h:26,
                 from /io/copasi-dependencies/src/NativeJIT/inc/NativeJIT/ExpressionTree.h:29,
                 from /io/copasi-dependencies/src/NativeJIT/inc/NativeJIT/ExecutionPreconditionTest.h:27,
                 from /io/copasi-dependencies/src/NativeJIT/src/NativeJIT/ExpressionTree.cpp:27:
In member function ‘constexpr const std::array<_Tp, _Nm>::value_type& std::array<_Tp, _Nm>::operator[](size_type) const [with _Tp = unsigned int; long unsigned int _Nm = 17]’,
    inlined from ‘bool NativeJIT::ExpressionTree::FreeList<REGISTER_COUNT, ISFLOAT>::IsPinned(unsigned int) const [with unsigned int REGISTER_COUNT = 17; bool ISFLOAT = false]’ at /io/copasi-dependencies/src/NativeJIT/inc/NativeJIT/ExpressionTree.h:1160:26,
    inlined from ‘bool NativeJIT::ExpressionTree::IsPinned(NativeJIT::Register<SIZE1, ISFLOAT1>) [with unsigned int SIZE = 8; bool ISFLOAT = false]’ at /io/copasi-dependencies/src/NativeJIT/inc/NativeJIT/ExpressionTree.h:246:33,
    inlined from ‘NativeJIT::ExpressionTree::Storage<T> NativeJIT::ExpressionTree::Direct(typename Storage<T>::DirectRegister) [with T = long unsigned int]’ at /io/copasi-dependencies/src/NativeJIT/inc/NativeJIT/ExpressionTree.h:127:9:
/usr/include/c++/13/array:213:24: error: array subscript 17 is above array bounds of ‘std::__array_traits<unsigned int, 17>::_Type’ {aka ‘const unsigned int [17]’} [-Werror=array-bounds=]
  213 |         return _M_elems[__n];
      |                ~~~~~~~~^
/usr/include/c++/13/array: In member function ‘NativeJIT::ExpressionTree::Storage<T> NativeJIT::ExpressionTree::Direct(typename Storage<T>::DirectRegister) [with T = long unsigned int]’:
/usr/include/c++/13/array:109:55: note: while referencing ‘std::array<unsigned int, 17>::_M_elems’
  109 |       typename __array_traits<_Tp, _Nm>::_Type        _M_elems;
      |                                                       ^~~~~~~~
In member function ‘constexpr const std::array<_Tp, _Nm>::value_type& std::array<_Tp, _Nm>::operator[](size_type) const [with _Tp = unsigned int; long unsigned int _Nm = 17]’,
    inlined from ‘bool NativeJIT::ExpressionTree::FreeList<REGISTER_COUNT, ISFLOAT>::IsPinned(unsigned int) const [with unsigned int REGISTER_COUNT = 17; bool ISFLOAT = false]’ at /io/copasi-dependencies/src/NativeJIT/inc/NativeJIT/ExpressionTree.h:1160:26,
    inlined from ‘bool NativeJIT::ExpressionTree::IsPinned(NativeJIT::Register<SIZE1, ISFLOAT1>) [with unsigned int SIZE = 8; bool ISFLOAT = false]’ at /io/copasi-dependencies/src/NativeJIT/inc/NativeJIT/ExpressionTree.h:246:33,
    inlined from ‘NativeJIT::ExpressionTree::Storage<T> NativeJIT::ExpressionTree::Direct(typename Storage<T>::DirectRegister) [with T = void*]’ at /io/copasi-dependencies/src/NativeJIT/inc/NativeJIT/ExpressionTree.h:127:9:
/usr/include/c++/13/array:213:24: error: array subscript 17 is above array bounds of ‘std::__array_traits<unsigned int, 17>::_Type’ {aka ‘const unsigned int [17]’} [-Werror=array-bounds=]
  213 |         return _M_elems[__n];
      |                ~~~~~~~~^
/usr/include/c++/13/array: In member function ‘NativeJIT::ExpressionTree::Storage<T> NativeJIT::ExpressionTree::Direct(typename Storage<T>::DirectRegister) [with T = void*]’:
/usr/include/c++/13/array:109:55: note: while referencing ‘std::array<unsigned int, 17>::_M_elems’
  109 |       typename __array_traits<_Tp, _Nm>::_Type        _M_elems;
      |                                                       ^~~~~~~~
In member function ‘constexpr const std::array<_Tp, _Nm>::value_type& std::array<_Tp, _Nm>::operator[](size_type) const [with _Tp = unsigned int; long unsigned int _Nm = 16]’,
    inlined from ‘bool NativeJIT::ExpressionTree::FreeList<REGISTER_COUNT, ISFLOAT>::IsPinned(unsigned int) const [with unsigned int REGISTER_COUNT = 16; bool ISFLOAT = true]’ at /io/copasi-dependencies/src/NativeJIT/inc/NativeJIT/ExpressionTree.h:1160:26,
    inlined from ‘bool NativeJIT::ExpressionTree::IsPinned(NativeJIT::Register<SIZE1, ISFLOAT1>) [with unsigned int SIZE = 8; bool ISFLOAT = true]’ at /io/copasi-dependencies/src/NativeJIT/inc/NativeJIT/ExpressionTree.h:246:33,
    inlined from ‘NativeJIT::ExpressionTree::Storage<T> NativeJIT::ExpressionTree::Direct(typename Storage<T>::DirectRegister) [with T = double]’ at /io/copasi-dependencies/src/NativeJIT/inc/NativeJIT/ExpressionTree.h:127:9:
/usr/include/c++/13/array:213:24: error: array subscript 16 is above array bounds of ‘std::__array_traits<unsigned int, 16>::_Type’ {aka ‘const unsigned int [16]’} [-Werror=array-bounds=]
  213 |         return _M_elems[__n];
      |                ~~~~~~~~^
/usr/include/c++/13/array: In member function ‘NativeJIT::ExpressionTree::Storage<T> NativeJIT::ExpressionTree::Direct(typename Storage<T>::DirectRegister) [with T = double]’:
/usr/include/c++/13/array:109:55: note: while referencing ‘std::array<unsigned int, 16>::_M_elems’
  109 |       typename __array_traits<_Tp, _Nm>::_Type        _M_elems;
      |