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

            Bug ID: 120852
           Summary: internal compiler error: in analyze_functions, at
                    cgraphunit.cc:1418
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bic60176 at gmail dot com
  Target Milestone: ---

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

Compiler Explorer: https://godbolt.org/z/vK1vGjGzn

Console:
<source>: In function 'check9':
<source>:14:38: error: incompatible types when returning type 'int' but 'C' was
expected
   14 | extern WURAI C check9(void) { return 0;
      |                                      ^
<source>:18:18: error: nested function 'check11' declared 'extern'
   18 | extern WURAI int check11(void) { return baz(); }
      |                  ^~~~~~~
<source>:27:1: error: expected declaration or statement at end of input
   27 | }
      | ^
At top level:
cc1: internal compiler error: in analyze_functions, at cgraphunit.cc:1418
0x250ccf5 diagnostic_context::diagnostic_impl(rich_location*,
diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag
(*) [1], diagnostic_t)
        ???:0
0x252f896 internal_error(char const*, ...)
        ???:0
0x9fd4f2 fancy_abort(char const*, int, char const*)
        ???:0
0xc238e1 symbol_table::finalize_compilation_unit()
        ???: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.
Compiler returned: 1

Reply via email to