This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/52722] ICE in lto_output_varpool_node
- From: "markus at trippelsdorf dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 26 Mar 2012 14:05:56 +0000
- Subject: [Bug lto/52722] ICE in lto_output_varpool_node
- Auto-submitted: auto-generated
- References: <bug-52722-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52722
Markus Trippelsdorf <markus at trippelsdorf dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |markus at trippelsdorf dot
| |de
--- Comment #3 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-03-26 14:05:56 UTC ---
Somewhat reduced testcase:
% cat test.ii
namespace std
{
namespace tr1
{
template < int,
typename ... >struct _Tuple_impl;
template < int _Idx > struct _Tuple_impl <_Idx > {
};
template < typename ... _Elements > class tuple:_Tuple_impl < 0,
_Elements ... >
{
};
}
}
namespace testing
{
namespace
{
class TestFactoryBase
{
};
}
namespace internal
{
template < class TestClass >
class ParameterizedTestFactory:TestFactoryBase
{
public:
typedef typename TestClass::ParamType ParamType;
ParameterizedTestFactory (ParamType):parameter_ () {
TestClass::SetParam (0);
}
ParamType parameter_;
};
template < class > class TestMetaFactoryBase
{
};
template < class TestCase > class TestMetaFactory:public TestMetaFactoryBase <
typename TestCase::
ParamType >
{
typedef typename TestCase::ParamType ParamType;
virtual TestFactoryBase *CreateTestFactory (ParamType p1) {
new ParameterizedTestFactory < TestCase > (p1);
}
};
template < class TestCase > class ParameterizedTestCaseInfo
{
public:
typedef typename TestCase::ParamType ParamType;
void AddTestPattern (char *, char *,
TestMetaFactoryBase < ParamType > *) {
}
};
class ParameterizedTestCaseRegistry
{
public:
template < class TestCase > ParameterizedTestCaseInfo < TestCase >
*GetTestCasePatternHolder (char *, char *, int) {
}
};
}
class Test
{
};
class UnitTest
{
public:
static UnitTest *GetInstance ();
internal::
ParameterizedTestCaseRegistry & parameterized_test_registry ();
};
template < typename T > class WithParamInterface
{
public:
typedef T ParamType;
static void SetParam (ParamType *) {
parameter_ = 0;
}
static const ParamType *parameter_;
};
template < typename T > const T *WithParamInterface < T >::parameter_;
}
class Foo:
testing::Test,
public
testing::WithParamInterface <
std::tr1::tuple < >>
{
};
class
Foo_Init_Test:
public
Foo
{
static int
AddToRegistry () {
testing::UnitTest::GetInstance ()->parameterized_test_registry ().
GetTestCasePatternHolder < Foo > ("Foo", "test.cpp",
0)->AddTestPattern ("Foo", "Init",
new testing::
internal::
TestMetaFactory <
Foo_Init_Test >);
}
static int
gtest_registering_dummy_;
};
int
Foo_Init_Test::gtest_registering_dummy_ = Foo_Init_Test::AddToRegistry ();
% g++ -o /dev/null -w -std=c++11 -flto test.ii
lto1: internal compiler error: in lto_output_varpool_node, at lto-cgraph.c:595
Please submit a full bug report,
with preprocessed source if appropriate.