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

Robert Dubner <rdubner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rdubner at gcc dot gnu.org
   Last reconfirmed|                            |2026-07-26
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jklowden at gcc dot 
gnu.org

--- Comment #1 from Robert Dubner <rdubner at gcc dot gnu.org> ---
Reproducers.  Compile with `-fdialect mf`
~~~~~~~~~~
identification division.
        program-id. maker.
        data division.
        working-storage section.
        01  genx pic x(80).
        78  rlen             value length of genx.
        procedure division.
        display rlen
        end program maker.

playpen.cbl:6:46: error: cannot define genx via self-reference
    6 |         78  rlen             value length of genx.
      |                                              ^~~~~
(null):0: confused by earlier errors, bailing out

~~~~~~~~~~
~~~~~~~~~~
identification division.
        program-id. maker.
        data division.
        working-storage section.
        01  genx pic x(80).
        01  bob pic x(12).
        78  rlen             value length of genx.
        procedure division.
        display rlen
        end program maker.
cobol1: internal compiler error: in encode_numeric, at cobol/util.cc:1508
0x390c5c6 internal_error(char const*, ...)
        ../../gcc/diagnostic-global-context.cc:787
0x39159ff fancy_abort(char const*, int, char const*)
        ../../gcc/diagnostics/context.cc:1813
0x132c4ab cbl_field_t::encode_numeric(char const*, cbl_loc_t)
        ../../gcc/cobol/util.cc:1508
0x1301a9b new_literal_float(cbl_loc_t const&, char const*)
        ../../gcc/cobol/symbols.cc:4133
0x1237e0c yyparse()
        ../../gcc/cobol/parse.y:8209
0x13319d7 parse_file
        ../../gcc/cobol/util.cc:3829
0x1331b45 cobol_parse_files(int, char const**)
        ../../gcc/cobol/util.cc:3884
0x1136bfa cobol_langhook_parse_file
        ../../gcc/cobol/cobol1.cc:812
~~~~~~~~~~

Reply via email to