[LLVMbugs] [Bug 7166] New: clang boost boost.geometry

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue May 18 14:05:00 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=7166

           Summary: clang boost boost.geometry
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: barend at xs4all.nl
                CC: llvmbugs at cs.uiuc.edu


About Boost.Geometry, I made a bug report a few days ago and it is solved.
One (probably the only) other test fails compiling using clang. It does not
crash but reports an error. I don't know exactly why. Probably it is something
in Boost.UBLAS. Can also be in glibcc. Might also be an error in our code. GCC
succeeds, as does MSVC.

A Boost.Geometry sample also fails for the same reason.


File:
<https://svn.boost.org/svn/boost/sandbox/geometry/libs/geometry/test/strategies/transformer.cpp>

Commands to reproduce:
1) Checking out Boost.Geometry, e.g. svn co
https://svn.boost.org/svn/boost/sandbox/geometry boost_geometry
2) cd boost_geometry/libs/geometry/test/strategies
3) clang -I.. -I../../../.. transformer.cpp -lstdc++ -v

This time I didn't try to create a minimal sample.


Messages:
transformer.cpp
clang version 2.0 (trunk 103958)
Target: i386-pc-linux-gnu
Thread model: posix
 "/home/barend/svn/llvm/Release/bin/clang" -cc1 -triple i386-pc-linux-gnu -S
-disable-free -main-file-name transformer.cpp -mrelocation-model static
-mdisable-fp-elim -mconstructor-aliases -target-cpu pentium4 -v -resource-dir
/home/barend/svn/llvm/Release/lib/clang/2.0 -I. -I.. -I../.. -I../../..
-I../../../.. -I../../../../.. -ferror-limit 19 -fmessage-length 0 -fexceptions
-fgnu-runtime -fdiagnostics-show-option -o /tmp/cc-OPAt2J.s -x c++
transformer.cpp
clang -cc1 version 2.0 based upon llvm 2.8svn hosted on i386-pc-linux-gnu
ignoring nonexistent directory "/usr/include/c++/4.4/x86_64-linux-gnu/32"
(...)
ignoring duplicate directory "/usr/include/c++/4.4/backward"
#include "..." search starts here:
#include <...> search starts here:
 .
 ..
 ../..
 ../../..
 ../../../..
 ../../../../..
 /usr/include/c++/4.4
 /usr/include/c++/4.4/backward
 /usr/include/c++/4.4/i486-linux-gnu
 /usr/local/include
 /home/barend/svn/llvm/Release/lib/clang/2.0/include
 /usr/include
End of search list.
In file included from transformer.cpp:10:
In file included from ../geometry_test_common.hpp:22:
In file included from /usr/include/boost/foreach.hpp:27:
In file included from /usr/include/c++/4.4/utility:62:
In file included from /usr/include/c++/4.4/bits/stl_pair.h:60:
/usr/include/c++/4.4/bits/move.h:82:11: error: read-only variable is not
assignable
      __a = _GLIBCXX_MOVE(__b);
      ~~~ ^
In file included from transformer.cpp:12:
In file included from
../../../../boost/geometry/strategies/transform/inverse_transformer.hpp:16:
In file included from /usr/include/boost/numeric/ublas/lu.hpp:16:
In file included from /usr/include/boost/numeric/ublas/operation.hpp:16:
In file included from /usr/include/boost/numeric/ublas/matrix_proxy.hpp:16:
In file included from
/usr/include/boost/numeric/ublas/matrix_expression.hpp:16:
In file included from
/usr/include/boost/numeric/ublas/vector_expression.hpp:16:
In file included from /usr/include/boost/numeric/ublas/expression_types.hpp:17:
/usr/include/boost/numeric/ublas/functional.hpp:318:13: note: in instantiation
of function template specialization 'std::swap<float const>' requested here
            std::swap (t1, t2);
            ^
In file included from transformer.cpp:12:
In file included from
../../../../boost/geometry/strategies/transform/inverse_transformer.hpp:16:
In file included from /usr/include/boost/numeric/ublas/lu.hpp:16:
In file included from /usr/include/boost/numeric/ublas/operation.hpp:16:
In file included from /usr/include/boost/numeric/ublas/matrix_proxy.hpp:18:
/usr/include/boost/numeric/ublas/detail/matrix_assign.hpp:1317:31: note: in
instantiation of member function 'boost::numeric::ublas::scalar_swap<float
const &, float const &>::apply' requested here
                functor_type::apply (*it2, *it2e), ++ it2, ++ it2e;
                              ^
/usr/include/boost/numeric/ublas/detail/matrix_assign.hpp:1610:9: note: in
instantiation of function template specialization
'boost::numeric::ublas::matrix_swap<scalar_swap,
boost::numeric::ublas::basic_full<unsigned int>,
boost::numeric::ublas::triangular_adaptor<boost::numeric::ublas::matrix<float,
boost::numeric::ublas::basic_row_major<unsigned int, int>,
boost::numeric::ublas::unbounded_array<float, std::allocator<float> > > const,
boost::numeric::ublas::basic_unit_lower<unsigned int> >,
boost::numeric::ublas::triangular_adaptor<boost::numeric::ublas::matrix<float,
boost::numeric::ublas::basic_row_major<unsigned int, int>,
boost::numeric::ublas::unbounded_array<float, std::allocator<float> > > const,
boost::numeric::ublas::basic_unit_lower<unsigned int> > >' requested here
        matrix_swap<F, unrestricted> (m, e, storage_category (),
orientation_category ());
        ^
In file included from transformer.cpp:12:
In file included from
../../../../boost/geometry/strategies/transform/inverse_transformer.hpp:16:
In file included from /usr/include/boost/numeric/ublas/lu.hpp:20:
/usr/include/boost/numeric/ublas/triangular.hpp:1117:17: note: in instantiation
of function template specialization
'boost::numeric::ublas::matrix_swap<scalar_swap,
boost::numeric::ublas::triangular_adaptor<boost::numeric::ublas::matrix<float,
boost::numeric::ublas::basic_row_major<unsigned int, int>,
boost::numeric::ublas::unbounded_array<float, std::allocator<float> > > const,
boost::numeric::ublas::basic_unit_lower<unsigned int> >,
boost::numeric::ublas::triangular_adaptor<boost::numeric::ublas::matrix<float,
boost::numeric::ublas::basic_row_major<unsigned int, int>,
boost::numeric::ublas::unbounded_array<float, std::allocator<float> > > const,
boost::numeric::ublas::basic_unit_lower<unsigned int> > >' requested here
                matrix_swap<scalar_swap> (*this, m);
                ^
/usr/include/boost/numeric/ublas/triangular.hpp:1121:16: note: in instantiation
of member function
'boost::numeric::ublas::triangular_adaptor<boost::numeric::ublas::matrix<float,
boost::numeric::ublas::basic_row_major<unsigned int, int>,
boost::numeric::ublas::unbounded_array<float, std::allocator<float> > > const,
boost::numeric::ublas::basic_unit_lower<unsigned int> >::swap' requested here
            m1.swap (m2);
               ^
/usr/include/boost/numeric/ublas/triangular.hpp:2450:24: note: (skipping 2
contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
        inplace_solve (triangular_adaptor<const E1, unit_lower> (e1 ()), e2,
                       ^
In file included from transformer.cpp:12:
In file included from
../../../../boost/geometry/strategies/transform/inverse_transformer.hpp:16:
/usr/include/boost/numeric/ublas/lu.hpp:294:9: note: in instantiation of
function template specialization
'boost::numeric::ublas::lu_substitute<boost::numeric::ublas::matrix<float,
boost::numeric::ublas::basic_row_major<unsigned int, int>,
boost::numeric::ublas::unbounded_array<float, std::allocator<float> > >,
boost::numeric::ublas::matrix<float,
boost::numeric::ublas::basic_row_major<unsigned int, int>,
boost::numeric::ublas::unbounded_array<float, std::allocator<float> > > >'
requested here
        lu_substitute (m, mv);
        ^
In file included from transformer.cpp:12:
../../../../boost/geometry/strategies/transform/inverse_transformer.hpp:60:13:
note: in instantiation of function template specialization
'boost::numeric::ublas::lu_substitute<boost::numeric::ublas::matrix<float,
boost::numeric::ublas::basic_row_major<unsigned int, int>,
boost::numeric::ublas::unbounded_array<float, std::allocator<float> > >,
unsigned int, boost::numeric::ublas::unbounded_array<unsigned int,
std::allocator<unsigned int> >, boost::numeric::ublas::matrix<float,
boost::numeric::ublas::basic_row_major<unsigned int, int>,
boost::numeric::ublas::unbounded_array<float, std::allocator<float> > > >'
requested here
            boost::numeric::ublas::lu_substitute(copy, pm, this->m_matrix);
            ^
transformer.cpp:30:69: note: in instantiation of function template
specialization
'boost::geometry::strategy::transform::inverse_transformer<boost::tuples::tuple<float,
float, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>,
boost::tuples::tuple<float, float, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type>
>::inverse_transformer<boost::geometry::strategy::transform::translate_transformer<boost::tuples::tuple<float,
float, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>,
boost::tuples::tuple<float, float, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type>, 2, 2> >' requested here
    boost::geometry::strategy::transform::inverse_transformer<P, P>
inverse(trans);
                                                                    ^
transformer.cpp:53:9: note: in instantiation of function template
specialization 'check_inverse<boost::tuples::tuple<float, float,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type>,
boost::geometry::strategy::transform::translate_transformer<boost::tuples::tuple<float,
float, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>,
boost::tuples::tuple<float, float, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type>, 2, 2> >' requested here
        check_inverse(tp, trans);
        ^
transformer.cpp:99:5: note: in instantiation of function template
specialization 'test_all<boost::tuples::tuple<float, float,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type> >' requested here
    test_all<boost::tuple<float, float> >();
    ^
In file included from transformer.cpp:10:
In file included from ../geometry_test_common.hpp:22:
In file included from /usr/include/boost/foreach.hpp:27:
In file included from /usr/include/c++/4.4/utility:62:
In file included from /usr/include/c++/4.4/bits/stl_pair.h:60:
/usr/include/c++/4.4/bits/move.h:82:11: error: read-only variable is not
assignable
      __a = _GLIBCXX_MOVE(__b);
      ~~~ ^
In file included from transformer.cpp:12:
In file included from
../../../../boost/geometry/strategies/transform/inverse_transformer.hpp:16:
In file included from /usr/include/boost/numeric/ublas/lu.hpp:16:
In file included from /usr/include/boost/numeric/ublas/operation.hpp:16:
In file included from /usr/include/boost/numeric/ublas/matrix_proxy.hpp:16:
In file included from
/usr/include/boost/numeric/ublas/matrix_expression.hpp:16:
In file included from
/usr/include/boost/numeric/ublas/vector_expression.hpp:16:
In file included from /usr/include/boost/numeric/ublas/expression_types.hpp:17:
/usr/include/boost/numeric/ublas/functional.hpp:318:13: note: in instantiation
of function template specialization 'std::swap<double const>' requested here
            std::swap (t1, t2);
            ^
In file included from transformer.cpp:12:
In file included from
../../../../boost/geometry/strategies/transform/inverse_transformer.hpp:16:
In file included from /usr/include/boost/numeric/ublas/lu.hpp:16:
In file included from /usr/include/boost/numeric/ublas/operation.hpp:16:
In file included from /usr/include/boost/numeric/ublas/matrix_proxy.hpp:18:
/usr/include/boost/numeric/ublas/detail/matrix_assign.hpp:1317:31: note: in
instantiation of member function 'boost::numeric::ublas::scalar_swap<double
const &, double const &>::apply' requested here
                functor_type::apply (*it2, *it2e), ++ it2, ++ it2e;
                              ^
/usr/include/boost/numeric/ublas/detail/matrix_assign.hpp:1610:9: note: in
instantiation of function template specialization
'boost::numeric::ublas::matrix_swap<scalar_swap,
boost::numeric::ublas::basic_full<unsigned int>,
boost::numeric::ublas::triangular_adaptor<boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_row_major<unsigned int, int>,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >
const, boost::numeric::ublas::basic_unit_lower<unsigned int> >,
boost::numeric::ublas::triangular_adaptor<boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_row_major<unsigned int, int>,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >
const, boost::numeric::ublas::basic_unit_lower<unsigned int> > >' requested
here
        matrix_swap<F, unrestricted> (m, e, storage_category (),
orientation_category ());
        ^
In file included from transformer.cpp:12:
In file included from
../../../../boost/geometry/strategies/transform/inverse_transformer.hpp:16:
In file included from /usr/include/boost/numeric/ublas/lu.hpp:20:
/usr/include/boost/numeric/ublas/triangular.hpp:1117:17: note: in instantiation
of function template specialization
'boost::numeric::ublas::matrix_swap<scalar_swap,
boost::numeric::ublas::triangular_adaptor<boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_row_major<unsigned int, int>,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >
const, boost::numeric::ublas::basic_unit_lower<unsigned int> >,
boost::numeric::ublas::triangular_adaptor<boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_row_major<unsigned int, int>,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >
const, boost::numeric::ublas::basic_unit_lower<unsigned int> > >' requested
here
                matrix_swap<scalar_swap> (*this, m);
                ^
/usr/include/boost/numeric/ublas/triangular.hpp:1121:16: note: in instantiation
of member function
'boost::numeric::ublas::triangular_adaptor<boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_row_major<unsigned int, int>,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >
const, boost::numeric::ublas::basic_unit_lower<unsigned int> >::swap' requested
here
            m1.swap (m2);
               ^
/usr/include/boost/numeric/ublas/triangular.hpp:2450:24: note: (skipping 2
contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
        inplace_solve (triangular_adaptor<const E1, unit_lower> (e1 ()), e2,
                       ^
In file included from transformer.cpp:12:
In file included from
../../../../boost/geometry/strategies/transform/inverse_transformer.hpp:16:
/usr/include/boost/numeric/ublas/lu.hpp:294:9: note: in instantiation of
function template specialization
'boost::numeric::ublas::lu_substitute<boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_row_major<unsigned int, int>,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >,
boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_row_major<unsigned int, int>,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > >'
requested here
        lu_substitute (m, mv);
        ^
In file included from transformer.cpp:12:
../../../../boost/geometry/strategies/transform/inverse_transformer.hpp:60:13:
note: in instantiation of function template specialization
'boost::numeric::ublas::lu_substitute<boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_row_major<unsigned int, int>,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >,
unsigned int, boost::numeric::ublas::unbounded_array<unsigned int,
std::allocator<unsigned int> >, boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_row_major<unsigned int, int>,
boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > >'
requested here
            boost::numeric::ublas::lu_substitute(copy, pm, this->m_matrix);
            ^
transformer.cpp:30:69: note: in instantiation of function template
specialization
'boost::geometry::strategy::transform::inverse_transformer<boost::geometry::point<double,
2, boost::geometry::cs::cartesian>, boost::geometry::point<double, 2,
boost::geometry::cs::cartesian>
>::inverse_transformer<boost::geometry::strategy::transform::translate_transformer<boost::geometry::point<double,
2, boost::geometry::cs::cartesian>, boost::geometry::point<double, 2,
boost::geometry::cs::cartesian>, 2, 2> >' requested here
    boost::geometry::strategy::transform::inverse_transformer<P, P>
inverse(trans);
                                                                    ^
transformer.cpp:53:9: note: in instantiation of function template
specialization 'check_inverse<boost::geometry::point<double, 2,
boost::geometry::cs::cartesian>,
boost::geometry::strategy::transform::translate_transformer<boost::geometry::point<double,
2, boost::geometry::cs::cartesian>, boost::geometry::point<double, 2,
boost::geometry::cs::cartesian>, 2, 2> >' requested here
        check_inverse(tp, trans);
        ^
transformer.cpp:103:5: note: in instantiation of function template
specialization 'test_all<boost::geometry::point<double, 2,
boost::geometry::cs::cartesian> >' requested here
    test_all<boost::geometry::point<double, 2, boost::geometry::cs::cartesian>
>();
    ^
2 errors generated.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list