From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28260 invoked by alias); 14 Feb 2014 15:35:24 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 28235 invoked by uid 48); 14 Feb 2014 15:35:20 -0000 From: "reichelt at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/60198] New: ICE with _Cilk_spawn in expression within template function Date: Fri, 14 Feb 2014 15:35:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: reichelt at gcc dot gnu.org 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: 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-02/txt/msg01324.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60198 Bug ID: 60198 Summary: ICE with _Cilk_spawn in expression within template function 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 valid(?) code snippet (compiled with "-fcilkplus") triggers an ICE on trunk: =========================================== template int foo() { int i = (_Cilk_spawn foo()) + 0; return i; } template int foo(); =========================================== bug.cc: In instantiation of 'int foo() [with T = int]': bug.cc:7:23: required from here bug.cc:3:31: internal compiler error: in tsubst_copy, at cp/pt.c:12887 int i = (_Cilk_spawn foo()) + 0; ^ 0x62a933 tsubst_copy ../../gcc/gcc/cp/pt.c:12887 0x607956 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../gcc/gcc/cp/pt.c:15110 0x608fda tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../gcc/gcc/cp/pt.c:14188 0x6115c6 tsubst_expr ../../gcc/gcc/cp/pt.c:13812 0x61435d tsubst_expr ../../gcc/gcc/cp/pt.c:13327 0x611093 tsubst_expr ../../gcc/gcc/cp/pt.c:13219 0x61208c tsubst_expr ../../gcc/gcc/cp/pt.c:13424 0x60f2a9 instantiate_decl(tree_node*, int, bool) ../../gcc/gcc/cp/pt.c:19690 0x64d8c7 instantiate_pending_templates(int) ../../gcc/gcc/cp/pt.c:19806 0x688bed cp_write_global_declarations() ../../gcc/gcc/cp/decl2.c:4148 Please submit a full bug report, [etc.]