public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60312] New: [4.9 Regression] [c++1y] ICE using auto as template parameter
@ 2014-02-22 1:27 reichelt at gcc dot gnu.org
2014-02-22 1:28 ` [Bug c++/60312] " reichelt at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-02-22 1:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60312
Bug ID: 60312
Summary: [4.9 Regression] [c++1y] ICE using auto as template
parameter
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Keywords: 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++1y") triggers an
ICE on trunk:
==================================
template<typename> struct A;
template<> struct A<auto>
{
template<int> void foo();
};
void bar()
{
A<auto>().foo<0>();
}
==================================
bug.cc: In substitution of 'template<int <anonymous> > void A<auto>::foo()
[with int <anonymous> = 0]':
bug.cc:10:20: required from here
bug.cc:5:22: internal compiler error: in tsubst, at cp/pt.c:11554
template<int> void foo();
^
0x621ff5 tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:11554
0x62cb32 tsubst_template_args
../../gcc/gcc/cp/pt.c:9837
0x62d5c3 tsubst_aggr_type
../../gcc/gcc/cp/pt.c:10034
0x61f961 tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:11445
0x61f1cb tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:11435
0x62b376 tsubst_arg_types
../../gcc/gcc/cp/pt.c:11091
0x62b77b tsubst_function_type
../../gcc/gcc/cp/pt.c:11190
0x61f85a tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:11903
0x646550 fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node*
const*, unsigned int, tree_node*, unification_kind_t, int, bool, bool)
../../gcc/gcc/cp/pt.c:15633
0x5b1941 add_template_candidate_real
../../gcc/gcc/cp/call.c:2974
0x5ad5ec add_template_candidate
../../gcc/gcc/cp/call.c:3071
0x5ad5ec add_candidates
../../gcc/gcc/cp/call.c:5132
0x5b71ae build_new_method_call_1
../../gcc/gcc/cp/call.c:7772
0x5b71ae build_new_method_call(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, tree_node*, int, tree_node**, int)
../../gcc/gcc/cp/call.c:7958
0x6b6f09 cp_parser_postfix_expression
../../gcc/gcc/cp/parser.c:6135
0x6b9286 cp_parser_unary_expression
../../gcc/gcc/cp/parser.c:7170
0x6b9faf cp_parser_binary_expression
../../gcc/gcc/cp/parser.c:7874
0x6ba4a1 cp_parser_assignment_expression
../../gcc/gcc/cp/parser.c:8112
0x6bc854 cp_parser_expression
../../gcc/gcc/cp/parser.c:8274
0x6bd08c cp_parser_expression
../../gcc/gcc/cp/parser.c:8313
Please submit a full bug report, [etc.]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/60312] [4.9 Regression] [c++1y] ICE using auto as template parameter
2014-02-22 1:27 [Bug c++/60312] New: [4.9 Regression] [c++1y] ICE using auto as template parameter reichelt at gcc dot gnu.org
@ 2014-02-22 1:28 ` reichelt at gcc dot gnu.org
2014-02-24 5:38 ` jason at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-02-22 1:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60312
Volker Reichelt <reichelt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.8.0
Target Milestone|--- |4.9.0
Known to fail| |4.9.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/60312] [4.9 Regression] [c++1y] ICE using auto as template parameter
2014-02-22 1:27 [Bug c++/60312] New: [4.9 Regression] [c++1y] ICE using auto as template parameter reichelt at gcc dot gnu.org
2014-02-22 1:28 ` [Bug c++/60312] " reichelt at gcc dot gnu.org
@ 2014-02-24 5:38 ` jason at gcc dot gnu.org
2014-02-24 18:47 ` jason at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2014-02-24 5:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60312
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2014-02-24
CC| |jason at gcc dot gnu.org
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/60312] [4.9 Regression] [c++1y] ICE using auto as template parameter
2014-02-22 1:27 [Bug c++/60312] New: [4.9 Regression] [c++1y] ICE using auto as template parameter reichelt at gcc dot gnu.org
2014-02-22 1:28 ` [Bug c++/60312] " reichelt at gcc dot gnu.org
2014-02-24 5:38 ` jason at gcc dot gnu.org
@ 2014-02-24 18:47 ` jason at gcc dot gnu.org
2014-02-24 18:47 ` jason at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2014-02-24 18:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60312
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/60312] [4.9 Regression] [c++1y] ICE using auto as template parameter
2014-02-22 1:27 [Bug c++/60312] New: [4.9 Regression] [c++1y] ICE using auto as template parameter reichelt at gcc dot gnu.org
` (2 preceding siblings ...)
2014-02-24 18:47 ` jason at gcc dot gnu.org
@ 2014-02-24 18:47 ` jason at gcc dot gnu.org
2014-02-24 21:17 ` abutcher at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2014-02-24 18:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60312
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Mon Feb 24 18:47:20 2014
New Revision: 208092
URL: http://gcc.gnu.org/viewcvs?rev=208092&root=gcc&view=rev
Log:
PR c++/60312
* parser.c (cp_parser_template_type_arg): Check for invalid 'auto'.
Added:
trunk/gcc/testsuite/g++.dg/cpp1y/auto-neg1.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/60312] [4.9 Regression] [c++1y] ICE using auto as template parameter
2014-02-22 1:27 [Bug c++/60312] New: [4.9 Regression] [c++1y] ICE using auto as template parameter reichelt at gcc dot gnu.org
` (3 preceding siblings ...)
2014-02-24 18:47 ` jason at gcc dot gnu.org
@ 2014-02-24 21:17 ` abutcher at gcc dot gnu.org
2014-02-24 21:25 ` reichelt at gcc dot gnu.org
2014-02-24 21:26 ` abutcher at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: abutcher at gcc dot gnu.org @ 2014-02-24 21:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60312
Adam Butcher <abutcher at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |abutcher at gcc dot gnu.org
--- Comment #3 from Adam Butcher <abutcher at gcc dot gnu.org> ---
I think this might have fixed PR c++/60311 too.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/60312] [4.9 Regression] [c++1y] ICE using auto as template parameter
2014-02-22 1:27 [Bug c++/60312] New: [4.9 Regression] [c++1y] ICE using auto as template parameter reichelt at gcc dot gnu.org
` (4 preceding siblings ...)
2014-02-24 21:17 ` abutcher at gcc dot gnu.org
@ 2014-02-24 21:25 ` reichelt at gcc dot gnu.org
2014-02-24 21:26 ` abutcher at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-02-24 21:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60312
--- Comment #4 from Volker Reichelt <reichelt at gcc dot gnu.org> ---
> I think this might have fixed PR c++/60311 too.
Alas not, that one still crashes for me.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/60312] [4.9 Regression] [c++1y] ICE using auto as template parameter
2014-02-22 1:27 [Bug c++/60312] New: [4.9 Regression] [c++1y] ICE using auto as template parameter reichelt at gcc dot gnu.org
` (5 preceding siblings ...)
2014-02-24 21:25 ` reichelt at gcc dot gnu.org
@ 2014-02-24 21:26 ` abutcher at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: abutcher at gcc dot gnu.org @ 2014-02-24 21:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60312
--- Comment #5 from Adam Butcher <abutcher at gcc dot gnu.org> ---
Actually strike that, my [local] changes relating to PR c++/60065
(http://gcc.gnu.org/ml/gcc-patches/2014-02/msg01437.html) seem to have changed
the behavior.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-02-24 21:26 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-22 1:27 [Bug c++/60312] New: [4.9 Regression] [c++1y] ICE using auto as template parameter reichelt at gcc dot gnu.org
2014-02-22 1:28 ` [Bug c++/60312] " reichelt at gcc dot gnu.org
2014-02-24 5:38 ` jason at gcc dot gnu.org
2014-02-24 18:47 ` jason at gcc dot gnu.org
2014-02-24 18:47 ` jason at gcc dot gnu.org
2014-02-24 21:17 ` abutcher at gcc dot gnu.org
2014-02-24 21:25 ` reichelt at gcc dot gnu.org
2014-02-24 21:26 ` abutcher 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).