public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "reichelt at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/59114] New: [c++1y] ICE using auto in conversion operator
Date: Wed, 13 Nov 2013 14:39:00 -0000	[thread overview]
Message-ID: <bug-59114-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 59114
           Summary: [c++1y] ICE using auto in conversion operator
           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
since GCC 4.8.0:

=======================================
template<int> struct A
{
  template<typename T> operator T();
};

void foo()
{
  A<0>().operator auto();
}
=======================================

bug.cc: In function 'void foo()':
bug.cc:8:24: internal compiler error: in push_access_scope, at cp/pt.c:220
   A<0>().operator auto();
                        ^
0x591647 push_access_scope
        ../../gcc/gcc/cp/pt.c:219
0x5e266c 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:15679
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
0x550617 build_new_method_call_1
        ../../gcc/gcc/cp/call.c:7698
0x550617 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:7884
0x652842 cp_parser_postfix_expression
        ../../gcc/gcc/cp/parser.c:6065
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
0x66248b cp_parser_function_body
        ../../gcc/gcc/cp/parser.c:18525
0x66248b cp_parser_ctor_initializer_opt_and_function_body
        ../../gcc/gcc/cp/parser.c:18561
0x6662c3 cp_parser_function_definition_after_declarator
        ../../gcc/gcc/cp/parser.c:22593
Please submit a full bug report, [etc.]


             reply	other threads:[~2013-11-13 14:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-13 14:39 reichelt at gcc dot gnu.org [this message]
2014-03-18 20:33 ` [Bug c++/59114] " reichelt at gcc dot gnu.org
2014-03-19  7:30 ` jakub at gcc dot gnu.org
2014-11-26 16:00 ` paolo.carlini at oracle dot com
2014-11-26 16:07 ` paolo at gcc dot gnu.org
2014-11-26 16:10 ` paolo.carlini at oracle dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-59114-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).