public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/39637]  New: ICE on ill-formed sizeof(<parameter-pack>) in variadic template
@ 2009-04-04 19:06 sebor at roguewave dot com
  2009-04-06  8:50 ` [Bug c++/39637] " dodji at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: sebor at roguewave dot com @ 2009-04-04 19:06 UTC (permalink / raw)
  To: gcc-bugs

[-- 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


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

end of thread, other threads:[~2009-05-05 21:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-04 19:06 [Bug c++/39637] New: ICE on ill-formed sizeof(<parameter-pack>) in variadic template sebor at roguewave dot com
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

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