public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60273] New: gcc gets confused when one class uses variadic
@ 2014-02-19 12:39 walter.mascarenhas at gmail dot com
  2014-02-19 20:32 ` [Bug c++/60273] " daniel.kruegler at googlemail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: walter.mascarenhas at gmail dot com @ 2014-02-19 12:39 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60273
           Summary: gcc gets confused when one class uses variadic
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: walter.mascarenhas at gmail dot com

Created attachment 32171
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32171&action=edit
gcc asked me to submit this file

//
// When compiling this file in Ubuntu 13.04, gcc 4.8.1 crashes with the
// following message. Clang 3.0 compiles the file with no problems.
//
// /home/walter/code/klein/tests/platform/gcc_bug/main.cc:-1: In instantiation
of 'struct Bar<Foo<int> >':
// /home/walter/code/klein/tests/platform/gcc_bug/main.cc:25: required from
here
// /home/walter/code/klein/tests/platform/gcc_bug/main.cc:20: internal compiler
error: Segmentation fault
//  template<int... Ns> using Buggy = typename X::template S<Ns...>;
// :-1: error: [main.o] Error 1^
//

struct A {};

template <class X>
struct Foo
{
  using Type = int;

  // if the next line is replaced by template <int... N> then all is fine
  template <int N1, int N2>
  using S = A;
};

template <class X>
struct Bar
{
  // if the next line is commented then all is fine.
  using Type = typename X::Type;

  // if the next line is commented then all is fine.
  template<int... Ns> using Buggy = typename X::template S<Ns...>;
};

void foobar()
{
  Bar< Foo<int> > bf;
}


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-23  1:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-19 12:39 [Bug c++/60273] New: gcc gets confused when one class uses variadic walter.mascarenhas at gmail dot com
2014-02-19 20:32 ` [Bug c++/60273] " daniel.kruegler at googlemail dot com
2014-02-19 20:36 ` mpolacek at gcc dot gnu.org
2021-07-23  1:12 ` [Bug c++/60273] [DR 1430] " pinskia at gcc dot gnu.org

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).