https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126499
Bug ID: 126499
Summary: cobol1: Assertion `e && e->type == SymField' failed.
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: cobol
Assignee: unassigned at gcc dot gnu.org
Reporter: simonsobisch at gnu dot org
Target Milestone: ---
01 mytype IS TYPEDEF.
05 my-rec PIC X(12).
*
linkage section.
01 my-data USAGE mytype.
PROCEDURE DIVISION.
010-Test-Usage-DISPLAY.
display 'x' my-data'x'
leads (with todays gcc master on godbolt) to
cobol1: ../../gcc-trunk-20260730/gcc/cobol/symbols.h:2445: const cbl_field_t*
cbl_field_of(const symbol_elem_t*): Assertion `e && e->type == SymField'
failed.
cobol1: internal compiler error: Aborted
0x27df818 diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
???:0
0x27d445b internal_error(char const*, ...)
???:0
0x72ddbfc9eb2c pthread_kill
???:0
0x72ddbfc4527d gsignal
???:0
0x72ddbfc288fe abort
???:0
0x72ddbfc3b516 __assert_fail
???:0
0xbaaf1b symbol_field_same_as(cbl_field_t*, cbl_field_t const*)
???:0
0xb3eeb5 yyparse()
???:0
0xbc3ef4 cobol_parse_files(int, char const**)
???:0