public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ppluzhnikov at google dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/61924] New: [C++11] ICE in instantiate_template_1, at cp/pt.c:15618
Date: Sat, 26 Jul 2014 20:41:00 -0000	[thread overview]
Message-ID: <bug-61924-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61924

            Bug ID: 61924
           Summary: [C++11] ICE in instantiate_template_1, at
                    cp/pt.c:15618
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ppluzhnikov at google dot com

Google ref: b/16582830

Gcc 4.8, 4.9 and current trunk @r213084 are affected.

// --- cut ---
struct function
{
    template < typename _Functor > function (_Functor);
};

template < typename > struct RetryingRpc
{
  template < typename StubType> RetryingRpc (StubType, function =[]{});
};

void fn()
{
  RetryingRpc<int> rpc(0, []{});
};
// --- cut ---

This is accepted by Clang, ICEs with current trunk:

gcc-svn-r213084/bin/g++ -c -std=c++11 t.ii
t.ii: In substitution of ‘template<class StubType> RetryingRpc<
<template-parameter-1-1> >::RetryingRpc(StubType, function) [with StubType =
int]’:
t.ii:13:31:   required from here
t.ii:13:31: internal compiler error: in instantiate_template_1, at
cp/pt.c:15618
   RetryingRpc<int> rpc(0, []{});
                               ^
0x5c094b instantiate_template_1
    ../../gcc/cp/pt.c:15618
0x5c094b instantiate_template(tree_node*, tree_node*, int)
    ../../gcc/cp/pt.c:15730
0x5ef8cb fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node*
const*, unsigned int, tree_node*, unification_kind_t, int, bool, bool)
    ../../gcc/cp/pt.c:16079
0x55f659 add_template_candidate_real
    ../../gcc/cp/call.c:3025
0x5600dc add_template_candidate
    ../../gcc/cp/call.c:3122
0x5600dc add_candidates
    ../../gcc/cp/call.c:5253
0x560956 build_new_method_call_1
    ../../gcc/cp/call.c:7944
0x560956 build_new_method_call(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, tree_node*, int, tree_node**, int)
    ../../gcc/cp/call.c:8140
0x561f29 build_special_member_call(tree_node*, tree_node*, vec<tree_node*,
va_gc, vl_embed>**, tree_node*, int, int)
    ../../gcc/cp/call.c:7684
0x6b7299 expand_default_init
    ../../gcc/cp/init.c:1707
0x6b7299 expand_aggr_init_1
    ../../gcc/cp/init.c:1808
0x6b9f5c build_aggr_init(tree_node*, tree_node*, int, int)
    ../../gcc/cp/init.c:1560
0x574b5c build_aggr_init_full_exprs
    ../../gcc/cp/decl.c:5645
0x574b5c check_initializer
    ../../gcc/cp/decl.c:5789
0x58544c cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
    ../../gcc/cp/decl.c:6461
0x676995 cp_parser_init_declarator
    ../../gcc/cp/parser.c:17058
0x6780d5 cp_parser_simple_declaration
    ../../gcc/cp/parser.c:11421
0x65bcf3 cp_parser_block_declaration
    ../../gcc/cp/parser.c:11302
0x65ce31 cp_parser_declaration_statement
    ../../gcc/cp/parser.c:10949
0x65d51b cp_parser_statement
    ../../gcc/cp/parser.c:9664
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
>From gcc-bugs-return-457160-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Jul 26 21:19:16 2014
Return-Path: <gcc-bugs-return-457160-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 5383 invoked by alias); 26 Jul 2014 21:19:15 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 5355 invoked by uid 48); 26 Jul 2014 21:19:11 -0000
From: "mikpelinux at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/61863] Data corruption when creating temporary object
Date: Sat, 26 Jul 2014 21:19:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.8.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mikpelinux at gmail dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-61863-4-ZmUsZL3zTo@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61863-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61863-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-07/txt/msg01751.txt.bz2
Content-length: 170

https://gcc.gnu.org/bugzilla/show_bug.cgi?ida863

--- Comment #2 from Mikael Pettersson <mikpelinux at gmail dot com> ---
This was fixed for 4.9 by r205694 (PR59374).


             reply	other threads:[~2014-07-26 20:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-26 20:41 ppluzhnikov at google dot com [this message]
2014-12-12 15:29 ` [Bug c++/61924] " ville.voutilainen at gmail dot com
2014-12-12 20:03 ` paolo.carlini at oracle dot com
2014-12-12 20:30 ` paolo at gcc dot gnu.org
2014-12-12 20:31 ` 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-61924-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).