From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21196 invoked by alias); 22 Jan 2014 23:10:55 -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 21180 invoked by uid 48); 22 Jan 2014 23:10:50 -0000 From: "n.sakisaka at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/59912] New: [C++1y] ICE when deducing return type for specialized functions Date: Wed, 22 Jan 2014 23:10: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: major X-Bugzilla-Who: n.sakisaka 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: 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-01/txt/msg02402.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59912 Bug ID: 59912 Summary: [C++1y] ICE when deducing return type for specialized functions Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: n.sakisaka at gmail dot com // normal function, OK // auto f(int) // { // return 0; // } // specialized function, NG template ReturnType f(T); template<> auto f(int) { return 0; } ICE error output: prog.cc:15:1: internal compiler error: Segmentation fault } ^ 0x95499f crash_signal /home/gccbuilder/gcc/gcc/toplev.c:337 0xb2aa12 make_decl_rtl(tree_node*) /home/gccbuilder/gcc/gcc/varasm.c:1274 0xb2b12a notice_global_symbol(tree_node*) /home/gccbuilder/gcc/gcc/varasm.c:1548 0x6e0251 cgraph_finalize_function(tree_node*, bool) /home/gccbuilder/gcc/gcc/cgraphunit.c:434 0x5fbd9f expand_or_defer_fn(tree_node*) /home/gccbuilder/gcc/gcc/cp/semantics.c:3979 0x5c2c56 cp_parser_function_definition_after_declarator /home/gccbuilder/gcc/gcc/cp/parser.c:22705 0x5c3b1c cp_parser_function_definition_from_specifiers_and_declarator /home/gccbuilder/gcc/gcc/cp/parser.c:22609 0x5c3b1c cp_parser_init_declarator /home/gccbuilder/gcc/gcc/cp/parser.c:16598 0x5c3e54 cp_parser_single_declaration /home/gccbuilder/gcc/gcc/cp/parser.c:23018 0x5c467d cp_parser_explicit_specialization /home/gccbuilder/gcc/gcc/cp/parser.c:14203 0x5cc553 cp_parser_declaration /home/gccbuilder/gcc/gcc/cp/parser.c:10941 0x5cb168 cp_parser_declaration_seq_opt /home/gccbuilder/gcc/gcc/cp/parser.c:10874 0x5cc9aa cp_parser_translation_unit /home/gccbuilder/gcc/gcc/cp/parser.c:4021 0x5cc9aa c_parse_file() /home/gccbuilder/gcc/gcc/cp/parser.c:31350 0x6758a3 c_common_parse_file() /home/gccbuilder/gcc/gcc/c-family/c-opts.c:1060 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. Working code: http://melpon.org/wandbox/permlink/WWuXWgF9W7E6bywL