public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/61924] New: [C++11] ICE in instantiate_template_1, at cp/pt.c:15618
@ 2014-07-26 20:41 ppluzhnikov at google dot com
  2014-12-12 15:29 ` [Bug c++/61924] " ville.voutilainen at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: ppluzhnikov at google dot com @ 2014-07-26 20:41 UTC (permalink / raw)
  To: gcc-bugs

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


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

* [Bug c++/61924] [C++11] ICE in instantiate_template_1, at cp/pt.c:15618
  2014-07-26 20:41 [Bug c++/61924] New: [C++11] ICE in instantiate_template_1, at cp/pt.c:15618 ppluzhnikov at google dot com
@ 2014-12-12 15:29 ` ville.voutilainen at gmail dot com
  2014-12-12 20:03 ` paolo.carlini at oracle dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: ville.voutilainen at gmail dot com @ 2014-12-12 15:29 UTC (permalink / raw)
  To: gcc-bugs

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

Ville Voutilainen <ville.voutilainen at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
      Known to work|                            |5.0
            Version|unknown                     |4.9.1
           Keywords|                            |ice-on-invalid-code
   Last reconfirmed|                            |2014-12-12
                 CC|                            |ville.voutilainen at gmail dot com
     Ever confirmed|0                           |1
      Known to fail|                            |4.8.2, 4.9.1

--- Comment #1 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
Current trunk accepts the code and diagnoses function::function as not being
defined, like clang does. Previous versions ICE.


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

* [Bug c++/61924] [C++11] ICE in instantiate_template_1, at cp/pt.c:15618
  2014-07-26 20:41 [Bug c++/61924] New: [C++11] ICE in instantiate_template_1, at cp/pt.c:15618 ppluzhnikov at google dot com
  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
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-12-12 20:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Thanks. Then let's add the testcase and close the bug.


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

* [Bug c++/61924] [C++11] ICE in instantiate_template_1, at cp/pt.c:15618
  2014-07-26 20:41 [Bug c++/61924] New: [C++11] ICE in instantiate_template_1, at cp/pt.c:15618 ppluzhnikov at google dot com
  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
  3 siblings, 0 replies; 5+ messages in thread
From: paolo at gcc dot gnu.org @ 2014-12-12 20:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Fri Dec 12 20:30:11 2014
New Revision: 218690

URL: https://gcc.gnu.org/viewcvs?rev=218690&root=gcc&view=rev
Log:
2014-12-12  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/61924
    * g++.dg/cpp0x/pr61924.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/pr61924.C
Modified:
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/61924] [C++11] ICE in instantiate_template_1, at cp/pt.c:15618
  2014-07-26 20:41 [Bug c++/61924] New: [C++11] ICE in instantiate_template_1, at cp/pt.c:15618 ppluzhnikov at google dot com
                   ` (2 preceding siblings ...)
  2014-12-12 20:30 ` paolo at gcc dot gnu.org
@ 2014-12-12 20:31 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-12-12 20:31 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |5.0

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Done.


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

end of thread, other threads:[~2014-12-12 20:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-26 20:41 [Bug c++/61924] New: [C++11] ICE in instantiate_template_1, at cp/pt.c:15618 ppluzhnikov at google dot com
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

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