public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109682] New: coroutines: ICE in morph_fn_to_coro on wrong return type for get_return_object_on_allocation_failure
@ 2023-04-30 21:37 dv at vollmann dot ch
  2023-04-30 21:39 ` [Bug c++/109682] " dv at vollmann dot ch
  0 siblings, 1 reply; 2+ messages in thread
From: dv at vollmann dot ch @ 2023-04-30 21:37 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109682
           Summary: coroutines: ICE in morph_fn_to_coro on wrong return
                    type for get_return_object_on_allocation_failure
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dv at vollmann dot ch
  Target Milestone: ---

Created attachment 54961
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54961&action=edit
Preprocessed source

Returning not the expected return type from
get_return_object_on_allocation_failure causes an internal compiler error:

g++ -std=c++23 wrong-promise-type-ice.cc
wrong-promise-type-ice.cc: In function 'CoHandle produce(QType&)':
wrong-promise-type-ice.cc:155:1: internal compiler error: in morph_fn_to_coro,
at cp/coroutines.cc:4766
  155 | }
      | ^
0x70d904 morph_fn_to_coro(tree_node*, tree_node**, tree_node**)
        /build/src/gcc/gcc/cp/coroutines.cc:4766
0xa65905 finish_function(bool)
        /build/src/gcc/gcc/cp/decl.cc:18082
0xb64697 cp_parser_function_definition_after_declarator
        /build/src/gcc/gcc/cp/parser.cc:32049
0xb65b73 cp_parser_function_definition_from_specifiers_and_declarator
        /build/src/gcc/gcc/cp/parser.cc:31963
0xb65b73 cp_parser_init_declarator
        /build/src/gcc/gcc/cp/parser.cc:22822
0xb3a178 cp_parser_simple_declaration
        /build/src/gcc/gcc/cp/parser.cc:15435
0xb70353 cp_parser_declaration
        /build/src/gcc/gcc/cp/parser.cc:15121
0xb70e4a cp_parser_toplevel_declaration
        /build/src/gcc/gcc/cp/parser.cc:15142
0xb70e4a cp_parser_translation_unit
        /build/src/gcc/gcc/cp/parser.cc:5131
0xb70e4a c_parse_file()
        /build/src/gcc/gcc/cp/parser.cc:49627
0xcaf411 c_common_parse_file()
        /build/src/gcc/gcc/c-family/c-opts.cc:1248

Version:
GNU C++23 (GCC) version 14.0.0 20230430 (experimental) (x86_64-pc-linux-gnu)

Configured with: /build/src/gcc/configure --prefix=/opt/native/gcc
--disable-nls --enable-languages=c,c++

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

* [Bug c++/109682] coroutines: ICE in morph_fn_to_coro on wrong return type for get_return_object_on_allocation_failure
  2023-04-30 21:37 [Bug c++/109682] New: coroutines: ICE in morph_fn_to_coro on wrong return type for get_return_object_on_allocation_failure dv at vollmann dot ch
@ 2023-04-30 21:39 ` dv at vollmann dot ch
  0 siblings, 0 replies; 2+ messages in thread
From: dv at vollmann dot ch @ 2023-04-30 21:39 UTC (permalink / raw)
  To: gcc-bugs

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

dv at vollmann dot ch changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dv at vollmann dot ch

--- Comment #1 from dv at vollmann dot ch ---
Created attachment 54962
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54962&action=edit
The original file, <coroutine> is a header supplied by GCC

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

end of thread, other threads:[~2023-04-30 21:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-30 21:37 [Bug c++/109682] New: coroutines: ICE in morph_fn_to_coro on wrong return type for get_return_object_on_allocation_failure dv at vollmann dot ch
2023-04-30 21:39 ` [Bug c++/109682] " dv at vollmann dot ch

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