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

            Bug ID: 123486
           Summary: ICE: tree check: expected class ‘type’, have
                    ‘exceptional’ (error_mark) in analyze_fn_parms, at
                    cp/coroutines.cc with incomplete parameter type
           Product: gcc
           Version: 15.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: 522024330006 at smail dot nju.edu.cn
  Target Milestone: ---

Created attachment 63284
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63284&action=edit
Testcase

To reproduce: https://godbolt.org/z/1Yr8x1c46

The code is shown in attachment.

GCC crashes with an ICE when compiling a coroutine where a parameter is an
incomplete type (forward-declared but not defined before the coroutine function
body).

Part of the traceback:
```
internal compiler error: tree check: expected class 'type', have 'exceptional'
(error_mark) in analyze_fn_parms, at cp/coroutines.cc:4262
   20 | }
      | ^
0x291af48 diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
        ???:0
0x290fd0b internal_error(char const*, ...)
        ???:0
0xa18d12 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
        ???:0
0xbb6c56 cp_coroutine_transform::apply_transforms()
        ???:0
0xc11821 finish_function(bool)
        ???:0
0xd542e3 c_parse_file()
        ???:0
0xec5d19 c_common_parse_file()
        ???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
```
  • [Bug c++/123486] New: IC... 522024330006 at smail dot nju.edu.cn via Gcc-bugs

Reply via email to