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

            Bug ID: 119520
           Summary: cobol1: internal compiler error: Segmentation fault
                    (use of field with unknown TYPEDEF)
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: cobol
          Assignee: unassigned at gcc dot gnu.org
          Reporter: simonsobisch at gnu dot org
  Target Milestone: ---

This program uses several typedefs and because of another bug (acknowledged by
James K. Lowden already who might file a bug on that: ">>IF CVAR IS NOT
DEFINED" is always coming back true) the typedef "INT" is not defined.

Therefore the compiler correctly finds at the time when that typedef is used:

01  SOPME-GID           USAGE INT       VALUE ZERO.

raises

 DATA-ITEM 'INT' not found


I _guess_ that the data-item which wanted to use this typedef is in some
strange state afterwards and the internal use of this lead to the following
error:


cobol1: internal compiler error: Segmentation fault
0x250a63f internal_error(char const*, ...)
        /home/me/gcc-cobol/gcc/diagnostic-global-context.cc:517
0x10d910f crash_signal
        /home/me/gcc-cobol/gcc/toplev.cc:322
0xa68551 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
        /home/me/gcc-cobol/gcc/tree.h:3832
0xa68551 gg_get_address_of(tree_node*)
        /home/me/gcc-cobol/gcc/cobol/gengen.cc:1481
0xa3419d parser_free(unsigned long, cbl_refer_t*)
        /home/me/gcc-cobol/gcc/cobol/genapi.cc:6148
0xaa33db yyparse()
        /home/me/gcc-cobol/gcc/cobol/parse.y:5668
0xb07979 parse_file
        /home/me/gcc-cobol/gcc/cobol/util.cc:2179
0xb07979 cobol_parse_files(int, char const**)
        /home/me/gcc-cobol/gcc/cobol/util.cc:2240

Reply via email to