public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60219] New: [4.8/4.9 Regression] [c++11] ICE invalid use of variadic template
@ 2014-02-15 22:58 reichelt at gcc dot gnu.org
2014-02-15 22:58 ` [Bug c++/60219] " reichelt at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-02-15 22:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60219
Bug ID: 60219
Summary: [4.8/4.9 Regression] [c++11] ICE invalid use of
variadic template
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Keywords: diagnostic, ice-on-invalid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: reichelt at gcc dot gnu.org
The following invalid code snippet (compiled with "-std=c++11") triggers
an ICE since GCC 4.8.0:
=============================================
template<typename..., int> void foo();
void bar()
{
foo<0>;
}
=============================================
bug.cc: In function 'void bar()':
bug.cc:5:9: internal compiler error: tree check: accessed elt 3 of tree_vec
with 2 elts in coerce_template_parms, at cp/pt.c:6857
foo<0>;
^
0xdca805 tree_vec_elt_check_failed(int, int, char const*, int, char const*)
../../gcc/gcc/tree.c:9377
0x61aa12 tree_vec_elt_check
../../gcc/gcc/tree.h:2899
0x61aa12 coerce_template_parms
../../gcc/gcc/cp/pt.c:6857
0x633577 resolve_nondeduced_context(tree_node*)
../../gcc/gcc/cp/pt.c:16561
0x6f9907 convert_to_void(tree_node*, impl_conv_void, int)
../../gcc/gcc/cp/cvt.c:1244
0x726d8a finish_expr_stmt(tree_node*)
../../gcc/gcc/cp/semantics.c:684
0x6ae3e8 cp_parser_statement
../../gcc/gcc/cp/parser.c:9473
0x6af1b9 cp_parser_statement_seq_opt
../../gcc/gcc/cp/parser.c:9745
0x6af326 cp_parser_compound_statement
../../gcc/gcc/cp/parser.c:9699
0x6c34fb cp_parser_function_body
../../gcc/gcc/cp/parser.c:18641
0x6c34fb cp_parser_ctor_initializer_opt_and_function_body
../../gcc/gcc/cp/parser.c:18677
0x6c7842 cp_parser_function_definition_after_declarator
../../gcc/gcc/cp/parser.c:22792
0x6c86e1 cp_parser_function_definition_from_specifiers_and_declarator
../../gcc/gcc/cp/parser.c:22704
0x6c86e1 cp_parser_init_declarator
../../gcc/gcc/cp/parser.c:16585
0x6c9979 cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:11205
0x6acc63 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:11086
0x6d3f12 cp_parser_declaration
../../gcc/gcc/cp/parser.c:10983
0x6d2c08 cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:10869
0x6d44aa cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:4014
0x6d44aa c_parse_file()
../../gcc/gcc/cp/parser.c:31536
Please submit a full bug report, [etc.]
If I actually try to call foo<0>, I get a broken diagnostic ending in a colon:
==============================================
template<typename..., int> void foo();
void bar()
{
foo<0>();
}
==============================================
bug.cc: In function 'void bar()':
bug.cc:5:10: error: no matching function for call to 'foo()'
foo<0>();
^
bug.cc:5:10: note: candidate is:
bug.cc:1:33: note: template<class ..., int <anonymous> > void foo()
template<typename..., int> void foo();
^
bug.cc:1:33: note: template argument deduction/substitution failed:
Why?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/60219] [4.8/4.9 Regression] [c++11] ICE invalid use of variadic template
2014-02-15 22:58 [Bug c++/60219] New: [4.8/4.9 Regression] [c++11] ICE invalid use of variadic template reichelt at gcc dot gnu.org
@ 2014-02-15 22:58 ` reichelt at gcc dot gnu.org
2014-02-16 19:35 ` reichelt at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-02-15 22:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60219
Volker Reichelt <reichelt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.7.0
Target Milestone|--- |4.8.4
Known to fail| |4.8.0, 4.9.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/60219] [4.8/4.9 Regression] [c++11] ICE invalid use of variadic template
2014-02-15 22:58 [Bug c++/60219] New: [4.8/4.9 Regression] [c++11] ICE invalid use of variadic template reichelt at gcc dot gnu.org
2014-02-15 22:58 ` [Bug c++/60219] " reichelt at gcc dot gnu.org
@ 2014-02-16 19:35 ` reichelt at gcc dot gnu.org
2014-02-17 10:05 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-02-16 19:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60219
Volker Reichelt <reichelt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.8.4 |4.8.3
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/60219] [4.8/4.9 Regression] [c++11] ICE invalid use of variadic template
2014-02-15 22:58 [Bug c++/60219] New: [4.8/4.9 Regression] [c++11] ICE invalid use of variadic template reichelt at gcc dot gnu.org
2014-02-15 22:58 ` [Bug c++/60219] " reichelt at gcc dot gnu.org
2014-02-16 19:35 ` reichelt at gcc dot gnu.org
@ 2014-02-17 10:05 ` jakub at gcc dot gnu.org
2014-02-17 12:27 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-17 10:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60219
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-02-17
CC| |jakub at gcc dot gnu.org,
| |jason at gcc dot gnu.org
Version|4.9.0 |4.8.3
Ever confirmed|0 |1
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started likely with r190653 (works with r190650, fails with r190662,
coerce_template_parms+resolve_nondeduced_context in backtrace).
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/60219] [4.8/4.9 Regression] [c++11] ICE invalid use of variadic template
2014-02-15 22:58 [Bug c++/60219] New: [4.8/4.9 Regression] [c++11] ICE invalid use of variadic template reichelt at gcc dot gnu.org
` (2 preceding siblings ...)
2014-02-17 10:05 ` jakub at gcc dot gnu.org
@ 2014-02-17 12:27 ` rguenth at gcc dot gnu.org
2014-02-21 6:06 ` jason at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-02-17 12:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60219
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/60219] [4.8/4.9 Regression] [c++11] ICE invalid use of variadic template
2014-02-15 22:58 [Bug c++/60219] New: [4.8/4.9 Regression] [c++11] ICE invalid use of variadic template reichelt at gcc dot gnu.org
` (3 preceding siblings ...)
2014-02-17 12:27 ` rguenth at gcc dot gnu.org
@ 2014-02-21 6:06 ` jason at gcc dot gnu.org
2014-02-21 14:57 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2014-02-21 6:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60219
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/60219] [4.8/4.9 Regression] [c++11] ICE invalid use of variadic template
2014-02-15 22:58 [Bug c++/60219] New: [4.8/4.9 Regression] [c++11] ICE invalid use of variadic template reichelt at gcc dot gnu.org
` (4 preceding siblings ...)
2014-02-21 6:06 ` jason at gcc dot gnu.org
@ 2014-02-21 14:57 ` jason at gcc dot gnu.org
2014-02-21 15:30 ` jason at gcc dot gnu.org
2014-02-21 15:55 ` jason at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2014-02-21 14:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60219
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Fri Feb 21 14:57:00 2014
New Revision: 208003
URL: http://gcc.gnu.org/viewcvs?rev=208003&root=gcc&view=rev
Log:
PR c++/60219
* pt.c (coerce_template_parms): Bail if argument packing fails.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/variadic150.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/60219] [4.8/4.9 Regression] [c++11] ICE invalid use of variadic template
2014-02-15 22:58 [Bug c++/60219] New: [4.8/4.9 Regression] [c++11] ICE invalid use of variadic template reichelt at gcc dot gnu.org
` (5 preceding siblings ...)
2014-02-21 14:57 ` jason at gcc dot gnu.org
@ 2014-02-21 15:30 ` jason at gcc dot gnu.org
2014-02-21 15:55 ` jason at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2014-02-21 15:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60219
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Fri Feb 21 15:29:25 2014
New Revision: 208007
URL: http://gcc.gnu.org/viewcvs?rev=208007&root=gcc&view=rev
Log:
PR c++/60219
* pt.c (coerce_template_parms): Bail if argument packing fails.
Added:
branches/gcc-4_8-branch/gcc/testsuite/g++.dg/cpp0x/variadic150.C
Modified:
branches/gcc-4_8-branch/gcc/cp/ChangeLog
branches/gcc-4_8-branch/gcc/cp/pt.c
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/60219] [4.8/4.9 Regression] [c++11] ICE invalid use of variadic template
2014-02-15 22:58 [Bug c++/60219] New: [4.8/4.9 Regression] [c++11] ICE invalid use of variadic template reichelt at gcc dot gnu.org
` (6 preceding siblings ...)
2014-02-21 15:30 ` jason at gcc dot gnu.org
@ 2014-02-21 15:55 ` jason at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2014-02-21 15:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60219
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 4.8.3/4.9.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-02-21 15:55 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-15 22:58 [Bug c++/60219] New: [4.8/4.9 Regression] [c++11] ICE invalid use of variadic template reichelt at gcc dot gnu.org
2014-02-15 22:58 ` [Bug c++/60219] " reichelt at gcc dot gnu.org
2014-02-16 19:35 ` reichelt at gcc dot gnu.org
2014-02-17 10:05 ` jakub at gcc dot gnu.org
2014-02-17 12:27 ` rguenth at gcc dot gnu.org
2014-02-21 6:06 ` jason at gcc dot gnu.org
2014-02-21 14:57 ` jason at gcc dot gnu.org
2014-02-21 15:30 ` jason at gcc dot gnu.org
2014-02-21 15:55 ` jason 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).