This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/58466] New: [4.8/4.9 Regression] ICE in cxx_eval_constant_expression


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

            Bug ID: 58466
           Summary: [4.8/4.9 Regression] ICE in
                    cxx_eval_constant_expression
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
                CC: jason at gcc dot gnu.org

template <char first, char... data>
struct CTArray
{
  static constexpr unsigned long count = sizeof... (data);
};
struct Str
{
  template <typename T>
  Str(T...) {}
};
template <typename T>
struct ToStr;
template <char... letters>
struct ToStr <CTArray <letters...>>
{
  static Str
  get ()
  {
    return { letters... };
  }
};
using Foo = CTArray <'F', 'o', 'o'>;
Str str(ToStr <Foo>::get ());

ICEs with -std=c++11.  Before r198750 it just errored out on the testcase (is
it invalid, right?), in r198800 ICEs, haven't bisected more.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]