[array] failures in c++11 mode

hi, r82834 seems to break compilation of boost.array when compiled in c++11 mode: ../../../boost/array.hpp:131:9: error: body of constexpr function ‘constexpr const T& boost::array<T, N>::operator[](boost::array<T, N>::size_type) const [with T = boost::heap::detail::skew_heap_node<q_tester, false>*; long unsigned int N = 2ul; boost::array<T, N>::const_reference = boost::heap::detail::skew_heap_node<q_tester, false>* const&; boost::array<T, N>::size_type = long unsigned int]’ not a return-statement the boost.heap testsuite exposes this failure: http://www.boost.org/development/tests/trunk/developer/output/Sandia-gcc-4-7... thnx, tim

On Feb 14, 2013, at 4:30 AM, Tim Blechmann <tim@klingt.org> wrote:
hi,
r82834 seems to break compilation of boost.array when compiled in c++11 mode:
../../../boost/array.hpp:131:9: error: body of constexpr function ‘constexpr const T& boost::array<T, N>::operator[](boost::array<T, N>::size_type) const [with T = boost::heap::detail::skew_heap_node<q_tester, false>*; long unsigned int N = 2ul; boost::array<T, N>::const_reference = boost::heap::detail::skew_heap_node<q_tester, false>* const&; boost::array<T, N>::size_type = long unsigned int]’ not a return-statement
the boost.heap testsuite exposes this failure: http://www.boost.org/development/tests/trunk/developer/output/Sandia-gcc-4-7...
Interesting. Which compiler are you using? All the heap tests (and the array tests, which include some constexpr tests) pass locally for me (in c++11 mode) - I'm using clang, btw. -- Marshall Marshall Clow Idio Software <mailto:mclow.lists@gmail.com> A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait). -- Yu Suzuki

the boost.heap testsuite exposes this failure: http://www.boost.org/development/tests/trunk/developer/output/Sandia-gcc-4-7... Interesting. Which compiler are you using?
i'm on gcc-4.7. but the testfarm shows this issue on 4.6, too. thnx, tim

On Feb 14, 2013, at 7:41 AM, Tim Blechmann <tim@klingt.org> wrote:
the boost.heap testsuite exposes this failure: http://www.boost.org/development/tests/trunk/developer/output/Sandia-gcc-4-7... Interesting. Which compiler are you using?
i'm on gcc-4.7. but the testfarm shows this issue on 4.6, too.
Ok; downloading gcc 4.7 to build and try. The routine that gcc is complaining about "not having a return", btw is: BOOST_CONSTEXPR const_reference operator[](size_type i) const { return BOOST_ASSERT_MSG( i < N, "out of range" ), elems[i]; } -- Marshall Marshall Clow Idio Software <mailto:mclow.lists@gmail.com> A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait). -- Yu Suzuki

On Feb 14, 2013, at 8:16 AM, Marshall Clow <mclow.lists@gmail.com> wrote:
On Feb 14, 2013, at 7:41 AM, Tim Blechmann <tim@klingt.org> wrote:
the boost.heap testsuite exposes this failure: http://www.boost.org/development/tests/trunk/developer/output/Sandia-gcc-4-7... Interesting. Which compiler are you using?
i'm on gcc-4.7. but the testfarm shows this issue on 4.6, too.
Ok; downloading gcc 4.7 to build and try.
The routine that gcc is complaining about "not having a return", btw is:
BOOST_CONSTEXPR const_reference operator[](size_type i) const { return BOOST_ASSERT_MSG( i < N, "out of range" ), elems[i]; }
Ok. I have built gcc 4.7.2 and run the array tests. I see the failure that you reported. I also see a gcc crash in the test "array_constexpr": darwin.compile.c++ ../../../bin.v2/libs/array/test/array_constexpr.test/darwin-11/debug/array_constexpr.o array_constexpr.cpp: In member function 'void test_main::test_method()': array_constexpr.cpp:32:36: in constexpr expansion of 'arr.boost::array<T, N>::at<int, 10ul>(3ul)' array_constexpr.cpp:32:36: internal compiler error: in adjust_temp_type, at cp/semantics.c:6400 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. More as I find it out. ;-) -- Marshall Marshall Clow Idio Software <mailto:mclow.lists@gmail.com> A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait). -- Yu Suzuki

I have built gcc 4.7.2 and run the array tests. I see the failure that you reported. I also see a gcc crash in the test "array_constexpr":
darwin.compile.c++ ../../../bin.v2/libs/array/test/array_constexpr.test/darwin-11/debug/array_constexpr.o array_constexpr.cpp: In member function 'void test_main::test_method()': array_constexpr.cpp:32:36: in constexpr expansion of 'arr.boost::array<T, N>::at<int, 10ul>(3ul)' array_constexpr.cpp:32:36: internal compiler error: in adjust_temp_type, at cp/semantics.c:6400 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions.
More as I find it out. ;-)
Just so you know, this is causing all the C++0x mode Boost.Math tests to fail currently. Tricky one to solve though :-( John.

I have built gcc 4.7.2 and run the array tests. I see the failure that you reported. I also see a gcc crash in the test "array_constexpr":
darwin.compile.c++ ../../../bin.v2/libs/array/test/array_constexpr.test/darwin-11/debug/a rray_constexpr.o array_constexpr.cpp: In member function 'void test_main::test_method()': array_constexpr.cpp:32:36: in constexpr expansion of 'arr.boost::array<T, N>::at<int, 10ul>(3ul)' array_constexpr.cpp:32:36: internal compiler error: in adjust_temp_type, at cp/semantics.c:6400 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions.
More as I find it out. ;-)
Just so you know, this is causing all the C++0x mode Boost.Math tests to fail currently.
Tricky one to solve though :-(
FWIW, code using Boost.Accumulator fails as well. Regards Hartmut --------------- http://boost-spirit.com http://stellar.cct.lsu.edu

John Maddock wrote:
I also see a gcc crash in the test "array_constexpr": [...] More as I find it out. ;-)
Just so you know, this is causing all the C++0x mode Boost.Math tests to fail currently.
The "array_constexpr" test runs fine on g++-4.8.0-20130203 (and clang). I also tried some Boost.Math examples, but they failed on g++-4.8 (and ran successfully on clang). Regards, Michel

On Feb 15, 2013, at 5:24 AM, John Maddock <boost.regex@virgin.net> wrote:
I have built gcc 4.7.2 and run the array tests. I see the failure that you reported. I also see a gcc crash in the test "array_constexpr":
darwin.compile.c++ ../../../bin.v2/libs/array/test/array_constexpr.test/darwin-11/debug/array_constexpr.o array_constexpr.cpp: In member function 'void test_main::test_method()': array_constexpr.cpp:32:36: in constexpr expansion of 'arr.boost::array<T, N>::at<int, 10ul>(3ul)' array_constexpr.cpp:32:36: internal compiler error: in adjust_temp_type, at cp/semantics.c:6400 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions.
More as I find it out. ;-)
Just so you know, this is causing all the C++0x mode Boost.Math tests to fail currently.
Tricky one to solve though :-(
I spoke to Johnathan Wakely about this yesterday, and he said:
I can't reproduce this crash.
(Partially) reduced test case attached. (Still needs parts of boost)
Ah yes, that crashes with GCC 4.7.2, but not with the pre-release 4.7.3 or with trunk - I'm pretty sure it's this bug I reported and the code is valid: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53839
That's the good news. The bad news is that no released version of gcc compiles it. I guess I'll revert it. :-( -- Marshall Marshall Clow Idio Software <mailto:mclow.lists@gmail.com> A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait). -- Yu Suzuki

On Feb 15, 2013, at 7:39 AM, Marshall Clow <mclow.lists@gmail.com> wrote:
On Feb 15, 2013, at 5:24 AM, John Maddock <boost.regex@virgin.net> wrote:
I have built gcc 4.7.2 and run the array tests. I see the failure that you reported. I also see a gcc crash in the test "array_constexpr":
darwin.compile.c++ ../../../bin.v2/libs/array/test/array_constexpr.test/darwin-11/debug/array_constexpr.o array_constexpr.cpp: In member function 'void test_main::test_method()': array_constexpr.cpp:32:36: in constexpr expansion of 'arr.boost::array<T, N>::at<int, 10ul>(3ul)' array_constexpr.cpp:32:36: internal compiler error: in adjust_temp_type, at cp/semantics.c:6400 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions.
More as I find it out. ;-)
Just so you know, this is causing all the C++0x mode Boost.Math tests to fail currently.
Tricky one to solve though :-(
I spoke to Johnathan Wakely about this yesterday, and he said:
I can't reproduce this crash.
(Partially) reduced test case attached. (Still needs parts of boost)
Ah yes, that crashes with GCC 4.7.2, but not with the pre-release 4.7.3 or with trunk - I'm pretty sure it's this bug I reported and the code is valid: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53839
That's the good news. The bad news is that no released version of gcc compiles it.
Reverted the offending bits in [82906] -- Marshall Marshall Clow Idio Software <mailto:mclow.lists@gmail.com> A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait). -- Yu Suzuki
participants (5)
-
Hartmut Kaiser
-
John Maddock
-
Marshall Clow
-
Michel Morin
-
Tim Blechmann