public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59912] New: [C++1y] ICE when deducing return type for specialized functions
@ 2014-01-22 23:10 n.sakisaka at gmail dot com
  2014-03-23 19:20 ` [Bug c++/59912] " reichelt at gcc dot gnu.org
  2014-12-05 15:07 ` redi at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: n.sakisaka at gmail dot com @ 2014-01-22 23:10 UTC (permalink / raw)
  To: gcc-bugs

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<class T, class ReturnType>
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 <http://gcc.gnu.org/bugs.html> for instructions.


Working code:
http://melpon.org/wandbox/permlink/WWuXWgF9W7E6bywL


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

* [Bug c++/59912] [C++1y] ICE when deducing return type for specialized functions
  2014-01-22 23:10 [Bug c++/59912] New: [C++1y] ICE when deducing return type for specialized functions n.sakisaka at gmail dot com
@ 2014-03-23 19:20 ` reichelt at gcc dot gnu.org
  2014-12-05 15:07 ` redi at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-03-23 19:20 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59912

Volker Reichelt <reichelt at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-03-23
                 CC|                            |reichelt at gcc dot gnu.org
     Ever confirmed|0                           |1
      Known to fail|                            |4.8.0, 4.9.0

--- Comment #1 from Volker Reichelt <reichelt at gcc dot gnu.org> ---
Confirmed.


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

* [Bug c++/59912] [C++1y] ICE when deducing return type for specialized functions
  2014-01-22 23:10 [Bug c++/59912] New: [C++1y] ICE when deducing return type for specialized functions n.sakisaka at gmail dot com
  2014-03-23 19:20 ` [Bug c++/59912] " reichelt at gcc dot gnu.org
@ 2014-12-05 15:07 ` redi at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2014-12-05 15:07 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|major                       |normal

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This also crashes clang++ and EDG!


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

end of thread, other threads:[~2014-12-05 15:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-22 23:10 [Bug c++/59912] New: [C++1y] ICE when deducing return type for specialized functions n.sakisaka at gmail dot com
2014-03-23 19:20 ` [Bug c++/59912] " reichelt at gcc dot gnu.org
2014-12-05 15:07 ` redi at gcc dot gnu.org

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