public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59115] New: [c++1y] ICE with auto as template parameter
@ 2013-11-13 14:43 reichelt at gcc dot gnu.org
  2013-11-24 17:55 ` [Bug c++/59115] " adam at jessamine dot co.uk
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-11-13 14:43 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59115
           Summary: [c++1y] ICE with auto as template parameter
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          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 T, auto, int = 0> void foo(T, auto) {}

void bar()
{
  foo(0, 0);
}
===============================================================

bug.cc:1:22: error: 'auto' parameter not permitted in this context
 template<typename T, auto, int = 0> void foo(T, auto) {}
                      ^
bug.cc: In substitution of 'template<class T, <declaration error>, int
<anonymous>, class auto:1> void foo(T, auto:1) [with T = int; <declaration
error> = <missing>; int <anonymous> = <missing>; auto:1 = <missing>]':
bug.cc:5:11:   required from here
bug.cc:5:11: internal compiler error: in unify, at cp/pt.c:17279
   foo(0, 0);
           ^
0x5d5e3d unify
        ../../gcc/gcc/cp/pt.c:17279
0x5de566 unify_one_argument
        ../../gcc/gcc/cp/pt.c:16102
0x5d3493 type_unification_real
        ../../gcc/gcc/cp/pt.c:16174
0x5e225e 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:15615
0x54d05c add_template_candidate_real
        ../../gcc/gcc/cp/call.c:2923
0x548ce9 add_template_candidate
        ../../gcc/gcc/cp/call.c:3020
0x548ce9 add_candidates
        ../../gcc/gcc/cp/call.c:5075
0x550062 perform_overload_resolution
        ../../gcc/gcc/cp/call.c:3816
0x556b5a build_new_function_call(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, bool, int)
        ../../gcc/gcc/cp/call.c:3893
0x6cc2d0 finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
        ../../gcc/gcc/cp/semantics.c:2274
0x652023 cp_parser_postfix_expression
        ../../gcc/gcc/cp/parser.c:6094
0x6548cd cp_parser_unary_expression
        ../../gcc/gcc/cp/parser.c:7100
0x65543f cp_parser_binary_expression
        ../../gcc/gcc/cp/parser.c:7804
0x65590f cp_parser_assignment_expression
        ../../gcc/gcc/cp/parser.c:8042
0x657e63 cp_parser_expression
        ../../gcc/gcc/cp/parser.c:8204
0x65865e cp_parser_expression
        ../../gcc/gcc/cp/parser.c:8243
0x65865e cp_parser_expression_statement
        ../../gcc/gcc/cp/parser.c:9542
0x64df67 cp_parser_statement
        ../../gcc/gcc/cp/parser.c:9393
0x64ec49 cp_parser_statement_seq_opt
        ../../gcc/gcc/cp/parser.c:9665
0x64edbe cp_parser_compound_statement
        ../../gcc/gcc/cp/parser.c:9619
Please submit a full bug report, [etc.]


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

end of thread, other threads:[~2014-04-09  0:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-13 14:43 [Bug c++/59115] New: [c++1y] ICE with auto as template parameter reichelt at gcc dot gnu.org
2013-11-24 17:55 ` [Bug c++/59115] " adam at jessamine dot co.uk
2013-12-19 15:20 ` [Bug c++/59115] [4.7/4.8/4.9 Regression] ICE with invalid " rguenth at gcc dot gnu.org
2013-12-19 15:33 ` rguenth at gcc dot gnu.org
2014-04-08  1:27 ` paolo.carlini at oracle dot com
2014-04-09  0:10 ` paolo at gcc dot gnu.org
2014-04-09  0:11 ` paolo.carlini at oracle dot com

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