Bug 1212424 - internal compiler error: in finish_member_declaration
Summary: internal compiler error: in finish_member_declaration
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Developer Toolset
Classification: Red Hat
Component: gcc
Version: DTS 3.0 RHEL 6
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: alpha
: 5.0
Assignee: Jakub Jelinek
QA Contact: Michael Petlan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-16 11:49 UTC by Gregor Jasny
Modified: 2016-11-15 10:07 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-15 10:07:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Preprocessed source (4.82 MB, text/x-csrc)
2015-04-16 11:49 UTC, Gregor Jasny
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 50800 0 None None None Never
Red Hat Product Errata RHBA-2016:2734 0 normal SHIPPED_LIVE new packages: devtoolset-6-gcc 2016-11-15 14:47:21 UTC

Description Gregor Jasny 2015-04-16 11:49:21 UTC
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:

Comment 2 Marek Polacek 2015-04-16 12:10:05 UTC
Reproduced, even GCC mainline ICEs.  In fact, I think this is PR50800.

Comment 3 Marek Polacek 2015-04-16 12:41:36 UTC
As a workaround, try not to use typedefs with may_alias (or similar attributes) as template parameters.

Comment 5 Dimitry Andric 2015-09-02 13:32:14 UTC
(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.

Comment 10 Michael Petlan 2016-11-01 13:53:27 UTC
Reproducible easily, verified with devtoolset-6-gcc-6.2.1-3.1.el{67}.

VERIFIED.

Comment 12 errata-xmlrpc 2016-11-15 10:07:51 UTC
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


Note You need to log in before you can comment on or make changes to this bug.