From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12766 invoked by alias); 24 Feb 2014 20:13:43 -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 12744 invoked by uid 48); 24 Feb 2014 20:13:39 -0000 From: "reichelt at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/60332] New: [c++1y] ICE with auto in function-pointer cast Date: Mon, 24 Feb 2014 20:13: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: ice-on-valid-code, lto 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 keywords 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/msg02464.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60332 Bug ID: 60332 Summary: [c++1y] ICE with auto in function-pointer cast Product: gcc Version: 4.9.0 Status: UNCONFIRMED Keywords: ice-on-valid-code, lto 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 "-std=c++1y -flto") triggers an ICE on trunk: ================================================================================= void foo(); auto f = (auto(*)())(&foo); ================================================================================= bug.cc:3:27: internal compiler error: tree code 'template_type_parm' is not supported in LTO streams auto f = (auto(*)())(&foo); ^ 0xaba08d DFS_write_tree ../../gcc/gcc/lto-streamer-out.c:1300 0xab941f DFS_write_tree_body ../../gcc/gcc/lto-streamer-out.c:476 0xab941f DFS_write_tree ../../gcc/gcc/lto-streamer-out.c:1208 0xab941f DFS_write_tree_body ../../gcc/gcc/lto-streamer-out.c:476 0xab941f DFS_write_tree ../../gcc/gcc/lto-streamer-out.c:1208 0xab941f DFS_write_tree_body ../../gcc/gcc/lto-streamer-out.c:476 0xab941f DFS_write_tree ../../gcc/gcc/lto-streamer-out.c:1208 0xabb727 lto_output_tree(output_block*, tree_node*, bool, bool) ../../gcc/gcc/lto-streamer-out.c:1390 0xab5aef write_global_stream ../../gcc/gcc/lto-streamer-out.c:2100 0xabd99e lto_output_decl_state_streams ../../gcc/gcc/lto-streamer-out.c:2144 0xabd99e produce_asm_for_decls() ../../gcc/gcc/lto-streamer-out.c:2429 0xaffe4f write_lto ../../gcc/gcc/passes.c:2297 0xb02ec0 ipa_write_summaries_1 ../../gcc/gcc/passes.c:2356 0xb02ec0 ipa_write_summaries() ../../gcc/gcc/passes.c:2413 0x891cf7 ipa_passes ../../gcc/gcc/cgraphunit.c:2078 0x891cf7 compile() ../../gcc/gcc/cgraphunit.c:2174 0x892224 finalize_compilation_unit() ../../gcc/gcc/cgraphunit.c:2329 0x68deee cp_write_global_declarations() ../../gcc/gcc/cp/decl2.c:4449 Please submit a full bug report, [etc.]