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
* [Bug c++/39637] ICE on ill-formed sizeof(<parameter-pack>) in variadic template
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 ` dodji at gcc dot gnu dot org
2009-04-06 10:28 ` dodji at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: dodji at gcc dot gnu dot org @ 2009-04-06 8:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from dodji at gcc dot gnu dot org 2009-04-06 08:50 -------
Confirmed on gcc trunk.
--
dodji at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |dodji at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-04-06 08:50:04
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39637
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/39637] ICE on ill-formed sizeof(<parameter-pack>) in variadic template
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
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: dodji at gcc dot gnu dot org @ 2009-04-06 10:28 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 468 bytes --]
------- Comment #2 from dodji at gcc dot gnu dot org 2009-04-06 10:28 -------
Created an attachment (id=17593)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17593&action=view)
candidate fix
I am regtesting this fix atm.
With it, I get the following error output from g++ trunk from today:
test.cc:11: instantiated from here
test.cc:5: error: enumerator value for e is not an integer constant
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39637
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/39637] ICE on ill-formed sizeof(<parameter-pack>) in variadic template
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
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: dodji at gcc dot gnu dot org @ 2009-04-08 8:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from dodji at gcc dot gnu dot org 2009-04-08 08:59 -------
Subject: Bug 39637
Author: dodji
Date: Wed Apr 8 08:59:02 2009
New Revision: 145713
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145713
Log:
gcc/cp/ChangeLog:
2009-04-08 Dodji Seketeli <dodji@redhat.com>
PR c++/39637
* parser.c (cp_parser_enumerator_definition): Make sure the
initializer of the enumerator doesn't contain any bare parameter pack.
gcc/testsuite/ChangeLog
2009-04-08 Dodji Seketeli <dodji@redhat.com>
PR c++/39637
* g++.dg/cpp0x/variadic-crash2.C: New test.
Added:
branches/gcc-4_3-branch/gcc/testsuite/g++.dg/cpp0x/variadic-crash2.C
Modified:
branches/gcc-4_3-branch/gcc/cp/ChangeLog
branches/gcc-4_3-branch/gcc/cp/parser.c
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39637
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/39637] ICE on ill-formed sizeof(<parameter-pack>) in variadic template
2009-04-04 19:06 [Bug c++/39637] New: ICE on ill-formed sizeof(<parameter-pack>) in variadic template sebor at roguewave dot com
` (2 preceding siblings ...)
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
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: dodji at gcc dot gnu dot org @ 2009-04-08 9:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from dodji at gcc dot gnu dot org 2009-04-08 09:06 -------
Subject: Bug 39637
Author: dodji
Date: Wed Apr 8 09:06:08 2009
New Revision: 145715
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145715
Log:
gcc/cp/ChangeLog:
2009-04-08 Dodji Seketeli <dodji@redhat.com>
PR c++/39637
* parser.c (cp_parser_enumerator_definition): Make sure the
initializer of the enumerator doesn't contain any bare parameter pack.
gcc/testsuite/ChangeLog
2009-04-08 Dodji Seketeli <dodji@redhat.com>
PR c++/39637
* g++.dg/cpp0x/variadic-crash2.C: New test.
Added:
branches/gcc-4_4-branch/gcc/testsuite/g++.dg/cpp0x/variadic-crash2.C
Modified:
branches/gcc-4_4-branch/gcc/cp/ChangeLog
branches/gcc-4_4-branch/gcc/cp/parser.c
branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39637
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/39637] ICE on ill-formed sizeof(<parameter-pack>) in variadic template
2009-04-04 19:06 [Bug c++/39637] New: ICE on ill-formed sizeof(<parameter-pack>) in variadic template sebor at roguewave dot com
` (3 preceding siblings ...)
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
6 siblings, 0 replies; 8+ messages in thread
From: dodji at gcc dot gnu dot org @ 2009-04-08 9:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from dodji at gcc dot gnu dot org 2009-04-08 09:40 -------
Subject: Bug 39637
Author: dodji
Date: Wed Apr 8 09:39:51 2009
New Revision: 145717
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145717
Log:
gcc/cp/ChangeLog:
2009-04-08 Dodji Seketeli <dodji@redhat.com>
PR c++/39637
* parser.c (cp_parser_enumerator_definition): Make sure the
initializer of the enumerator doesn't contain any bare parameter pack.
gcc/testsuite/ChangeLog
2009-04-08 Dodji Seketeli <dodji@redhat.com>
PR c++/39637
* g++.dg/cpp0x/variadic-crash2.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/variadic-crash2.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39637
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/39637] ICE on ill-formed sizeof(<parameter-pack>) in variadic template
2009-04-04 19:06 [Bug c++/39637] New: ICE on ill-formed sizeof(<parameter-pack>) in variadic template sebor at roguewave dot com
` (4 preceding siblings ...)
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
6 siblings, 0 replies; 8+ messages in thread
From: dodji at gcc dot gnu dot org @ 2009-04-08 9:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from dodji at gcc dot gnu dot org 2009-04-08 09:41 -------
Fixed in 4_3,4_4, and trunk.
--
dodji at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39637
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/39637] ICE on ill-formed sizeof(<parameter-pack>) in variadic template
2009-04-04 19:06 [Bug c++/39637] New: ICE on ill-formed sizeof(<parameter-pack>) in variadic template sebor at roguewave dot com
` (5 preceding siblings ...)
2009-04-08 9:41 ` dodji at gcc dot gnu dot org
@ 2009-05-05 21:13 ` reichelt at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2009-05-05 21:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from reichelt at gcc dot gnu dot org 2009-05-05 21:13 -------
*** Bug 35241 has been marked as a duplicate of this bug. ***
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
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).