Created attachment 1015151 [details] Preprocessed source Description of problem: We get an internal compiler error when compiling our software with the DTS3 GCC. Version-Release number of selected component (if applicable): devtoolset-3-gcc-c++-4.9.1-10.el6.x86_64 g++ (GCC) 4.9.1 20140922 (Red Hat 4.9.1-10) Actual results: [ 72%] Building CXX object Libraries/Facade/Test/Unit/CMakeFiles/test_facade.dir/CMFacadeTests.cpp.o cd /uhome/gjasny/Git/roster/_build64_dts2_d/Libraries/Facade/Test/Unit && /opt/rh/devtoolset-3/root/usr/bin/g++ -DBOOST_ENABLE_ASSERT_HANDLER -DBOOST_MPL_CFG_NO_PREPROCESSED_HEADERS -DBOOST_MPL_LIMIT_VECTOR_SIZE=40 -DCOL_PRODUCT_VERSION=\"V1.0.0+ROS_189_use_latest_rtccommon_privateBuild\" -D_FORTIFY_SOURCE=2 -Wall -Werror -fdiagnostics-show-option -pthread -Wformat=2 -fstack-protector -fno-strict-aliasing -O3 -DNDEBUG -ggdb -O2 -DNDEBUG -isystem /builds/ExternalLibs/boost/V1.50.0_1 -isystem /uhome/gjasny/Git/roster/3rdParty/gmock/include -isystem /uhome/gjasny/Git/roster/3rdParty/gmock/gtest/include -I/uhome/gjasny/Git/roster/Libraries/Facade/Test/Unit/../../Source -isystem /builds/ExternalLibs/protobuf/v2.4.1_1/Applications_rhel6_x64/include -I/uhome/gjasny/Git/roster/_build64_dts2_d -I/uhome/gjasny/Git/roster/_build64_dts2_d/Libraries/Facade/Test/Unit/../.. -I/uhome/gjasny/Git/roster/Libraries/Facade/Include -isystem /builds/RTC/Common/V1.1_178/Applications_rhel6_x64/include -I/builds/ExternalLibs/OpenSSL/1.0.2a_36/Applications_Linux26_x64/include -I/builds/ExternalLibs/IntelIpp/V8.1.1/Applications_linux26_x64/include -I/uhome/gjasny/Git/roster/Libraries/Roster/Include -o CMakeFiles/test_facade.dir/CMFacadeTests.cpp.o -c /uhome/gjasny/Git/roster/Libraries/Facade/Test/Unit/CMFacadeTests.cpp In file included from /uhome/gjasny/Git/roster/3rdParty/gmock/gtest/include/gtest/internal/gtest-port.h:594:0, from /uhome/gjasny/Git/roster/3rdParty/gmock/gtest/include/gtest/internal/gtest-linked_ptr.h:74, from /uhome/gjasny/Git/roster/3rdParty/gmock/include/gmock/internal/gmock-port.h:45, from /uhome/gjasny/Git/roster/3rdParty/gmock/include/gmock/internal/gmock-generated-internal-utils.h:44, from /uhome/gjasny/Git/roster/3rdParty/gmock/include/gmock/internal/gmock-internal-utils.h:45, from /uhome/gjasny/Git/roster/3rdParty/gmock/include/gmock/gmock-actions.h:46, from /uhome/gjasny/Git/roster/3rdParty/gmock/include/gmock/gmock.h:58, from /uhome/gjasny/Git/roster/Libraries/Facade/Test/Unit/CMFacadeTests.cpp:2: /usr/opt/rh/devtoolset-3/root/usr/include/c++/4.9.1/tr1/tuple: In instantiation of ‘struct std::tr1::__add_c_ref<boost::rv<boost::interprocess::unique_ptr<rtc::proxies::ICommand, rtc::proxies::my_default_deleter<rtc::proxies::ICommand> > >&>’: /usr/opt/rh/devtoolset-3/root/usr/include/c++/4.9.1/tr1/tuple:285:5: required by substitution of ‘template<int __i, class ... _Elements> typename std::tr1::__add_c_ref<typename std::tr1::tuple_element<__i, std::tr1::tuple<_Elements ...> >::type>::type std::tr1::get(const std::tr1::tuple<_Elements ...>&) [with int __i = 0; _Elements = {boost::rv<boost::interprocess::unique_ptr<rtc::proxies::ICommand, rtc::proxies::my_default_deleter<rtc::proxies::ICommand> > >&}]’ /uhome/gjasny/Git/roster/3rdParty/gmock/include/gmock/gmock-matchers.h:711:68: required from ‘static bool testing::internal::TuplePrefix<N>::Matches(const MatcherTuple&, const ValueTuple&) [with MatcherTuple = std::tr1::tuple<testing::Matcher<boost::rv<boost::interprocess::unique_ptr<rtc::proxies::ICommand, rtc::proxies::my_default_deleter<rtc::proxies::ICommand> > >&> >; ValueTuple = std::tr1::tuple<boost::rv<boost::interprocess::unique_ptr<rtc::proxies::ICommand, rtc::proxies::my_default_deleter<rtc::proxies::ICommand> > >&>; long unsigned int N = 1ul]’ /uhome/gjasny/Git/roster/3rdParty/gmock/include/gmock/gmock-matchers.h:784:41: required from ‘bool testing::internal::TupleMatches(const MatcherTuple&, const ValueTuple&) [with MatcherTuple = std::tr1::tuple<testing::Matcher<boost::rv<boost::interprocess::unique_ptr<rtc::proxies::ICommand, rtc::proxies::my_default_deleter<rtc::proxies::ICommand> > >&> >; ValueTuple = std::tr1::tuple<boost::rv<boost::interprocess::unique_ptr<rtc::proxies::ICommand, rtc::proxies::my_default_deleter<rtc::proxies::ICommand> > >&>]’ /uhome/gjasny/Git/roster/3rdParty/gmock/include/gmock/gmock-spec-builders.h:330:40: required from ‘bool testing::internal::OnCallSpec<F>::Matches(const ArgumentTuple&) const [with F = void(boost::rv<boost::interprocess::unique_ptr<rtc::proxies::ICommand, rtc::proxies::my_default_deleter<rtc::proxies::ICommand> > >&); testing::internal::OnCallSpec<F>::ArgumentTuple = std::tr1::tuple<boost::rv<boost::interprocess::unique_ptr<rtc::proxies::ICommand, rtc::proxies::my_default_deleter<rtc::proxies::ICommand> > >&>]’ /uhome/gjasny/Git/roster/3rdParty/gmock/include/gmock/gmock-spec-builders.h:1429:7: required from ‘const testing::internal::OnCallSpec<F>* testing::internal::FunctionMockerBase<F>::FindOnCallSpec(const ArgumentTuple&) const [with F = void(boost::rv<boost::interprocess::unique_ptr<rtc::proxies::ICommand, rtc::proxies::my_default_deleter<rtc::proxies::ICommand> > >&); testing::internal::FunctionMockerBase<F>::ArgumentTuple = std::tr1::tuple<boost::rv<boost::interprocess::unique_ptr<rtc::proxies::ICommand, rtc::proxies::my_default_deleter<rtc::proxies::ICommand> > >&>]’ /uhome/gjasny/Git/roster/3rdParty/gmock/include/gmock/gmock-spec-builders.h:1580:58: required from ‘void testing::internal::FunctionMockerBase<F>::DescribeDefaultActionTo(const ArgumentTuple&, std::ostream*) const [with F = void(boost::rv<boost::interprocess::unique_ptr<rtc::proxies::ICommand, rtc::proxies::my_default_deleter<rtc::proxies::ICommand> > >&); testing::internal::FunctionMockerBase<F>::ArgumentTuple = std::tr1::tuple<boost::rv<boost::interprocess::unique_ptr<rtc::proxies::ICommand, rtc::proxies::my_default_deleter<rtc::proxies::ICommand> > >&>; std::ostream = std::basic_ostream<char>]’ /uhome/gjasny/Git/roster/3rdParty/gmock/include/gmock/gmock-spec-builders.h:1602:37: required from ‘void testing::internal::FunctionMockerBase<F>::UntypedDescribeUninterestingCall(const void*, std::ostream*) const [with F = void(boost::rv<boost::interprocess::unique_ptr<rtc::proxies::ICommand, rtc::proxies::my_default_deleter<rtc::proxies::ICommand> > >&); std::ostream = std::basic_ostream<char>]’ /uhome/gjasny/Git/roster/Libraries/Facade/Test/Unit/CMFacadeTests.cpp:1786:3: required from here /usr/opt/rh/devtoolset-3/root/usr/include/c++/4.9.1/tr1/tuple:52:5: internal compiler error: in finish_member_declaration, at cp/semantics.c:2827 { typedef _Tp& type; }; ^ Please submit a full bug report, with preprocessed source if appropriate. See <http://bugzilla.redhat.com/bugzilla> for instructions. Document URL: Section Number and Name: Describe the issue: Suggestions for improvement: Additional information: Description of problem: Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Reproduced, even GCC mainline ICEs. In fact, I think this is PR50800.
As a workaround, try not to use typedefs with may_alias (or similar attributes) as template parameters.
(In reply to Marek Polacek from comment #3) > As a workaround, try not to use typedefs with may_alias (or similar > attributes) as template parameters. The problem here is that such typedefs come straight out of boost-devel, e.g. on RHEL7 with boost-devel-1.53.0-23.el7.x86_64, the header /usr/include/boost/move/core.hpp has: //Move emulation rv breaks standard aliasing rules so add workarounds for some compilers #if defined(__GNUC__) && (__GNUC__ >= 4) #define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS __attribute__((__may_alias__)) #else #define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS #endif You can also see this in gcc PR50800, where the original submitter encounters the ICE when compiling something that includes boost: /home/gaunard/dev/boost/trunk/boost/type_traits/detail/cv_traits_impl.hpp:36:1: internal compiler error: in finish_member_declaration, at cp/semantics.c:2559 Note that this ICE also reproduces with gcc-c++-4.8.3-9.el7.x86_64, which is the default compiler in RHEL7. So possibly many boost users are going to run into this.
Reproducible easily, verified with devtoolset-6-gcc-6.2.1-3.1.el{67}. VERIFIED.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2016-2734.html