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

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