public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "markus at trippelsdorf dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/52722] ICE in lto_output_varpool_node
Date: Mon, 26 Mar 2012 14:14:00 -0000	[thread overview]
Message-ID: <bug-52722-4-QO9Zt4Ks6A@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <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.


  parent reply	other threads:[~2012-03-26 14:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-26 12:27 [Bug lto/52722] New: " malcolm.parsons at gmail dot com
2012-03-26 12:35 ` [Bug lto/52722] " malcolm.parsons at gmail dot com
2012-03-26 13:01 ` rguenth at gcc dot gnu.org
2012-03-26 14:02 ` hubicka at gcc dot gnu.org
2012-03-26 14:14 ` markus at trippelsdorf dot de [this message]
2012-04-09 18:58 ` hubicka at gcc dot gnu.org
2012-04-09 23:41 ` hubicka at gcc dot gnu.org
2012-04-10 15:08 ` hubicka at gcc dot gnu.org
2021-12-24  9:00 ` pinskia at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-52722-4-QO9Zt4Ks6A@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).