public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "arturswiderski82 at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/55580] New: internal compiler error: Segmentation fault - with variadic template parameter
Date: Mon, 03 Dec 2012 21:13:00 -0000	[thread overview]
Message-ID: <bug-55580-4@http.gcc.gnu.org/bugzilla/> (raw)


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55580

             Bug #: 55580
           Summary: internal compiler error: Segmentation fault - with
                    variadic template parameter
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: arturswiderski82@gmail.com


Created attachment 28865
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28865
main.cpp to  reproduce  bug

Code( I belive  valid one ) listed  below  crashes compiler 
I compile it  with g++ -c  -std=c++11 main.cpp 



template < int const _speed >
struct ConstValue
{
    static int const  Value = _speed;
};

template<  typename ... _Rest >
struct Features
{
    typedef ConstValue< 0 > Average;
};


template< typename ... _Rest >
template< int const _speed >
struct Features<  ConstValue< _speed >,  _Rest  ... >
{
    typedef ConstValue< 2 > Average;
};


int  main ()
 {

    Features< ConstValue< 2 >, ConstValue< 2 > >::Average Oki;

     return 0;

 }


             reply	other threads:[~2012-12-03 21:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-03 21:13 arturswiderski82 at gmail dot com [this message]
2012-12-03 22:42 ` [Bug c++/55580] " vlukas at gmx dot de
2012-12-03 23:11 ` arturswiderski82 at gmail dot com
2012-12-04  0:12 ` paolo.carlini at oracle dot com

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-55580-4@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).