public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sebor at roguewave dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/39637]  New: ICE on ill-formed sizeof(<parameter-pack>) in variadic template
Date: Sat, 04 Apr 2009 19:06:00 -0000	[thread overview]
Message-ID: <bug-39637-1186@http.gcc.gnu.org/bugzilla/> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1854 bytes --]

gcc 4.3.2 fails with an ICE on the following ill-formed program. A fairly
recent (but not the most recent) version of 4.4 also fails.

$ cat t.C && g++ -dumpversion && g++ t.C -std=c++0x
template <class... Types>
void f (Types...)
{
    enum { e = sizeof (Types) };
};

int main ()
{
    f (0);
}
4.3.2
t.C: In function ‘void f(Types ...) [with Types = int]’:
t.C:9:   instantiated from here
t.C:4: internal compiler error: in dependent_type_p, at cp/pt.c:15758
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/cca3TXk5.out file, please attach this to
your bugreport.


$ g++ -v && g++ t.C
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: /home/sebor/gcc/trunk/configure
--prefix=/build/sebor/bin/gcc-4.4.0 --enable-languages=c,c++
--with-mpfr=/usr/local/mpfr-2.3.1
Thread model: posix
gcc version 4.4.0 20081105 (experimental) (GCC) 
t.C:1: warning: variadic templates only available with -std=c++0x or
-std=gnu++0x
t.C:2: warning: variadic templates only available with -std=c++0x or
-std=gnu++0x
t.C: In function ‘void f(Types ...) [with Types = int]’:
t.C:9:   instantiated from here
t.C:4: internal compiler error: in dependent_type_p, at cp/pt.c:15922
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


-- 
           Summary: ICE on ill-formed sizeof(<parameter-pack>) in variadic
                    template
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sebor at roguewave dot com


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


             reply	other threads:[~2009-04-04 19:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-04 19:06 sebor at roguewave dot com [this message]
2009-04-06  8:50 ` [Bug c++/39637] " dodji at gcc dot gnu dot org
2009-04-06 10:28 ` dodji at gcc dot gnu dot org
2009-04-08  8:59 ` dodji at gcc dot gnu dot org
2009-04-08  9:06 ` dodji at gcc dot gnu dot org
2009-04-08  9:40 ` dodji at gcc dot gnu dot org
2009-04-08  9:41 ` dodji at gcc dot gnu dot org
2009-05-05 21:13 ` reichelt at gcc dot gnu dot 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-39637-1186@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).