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

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

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

--- Comment #1 from Robert Dubner <rdubner at gcc dot gnu.org> ---
This is two bugs in one.

This program parses and compiles and an executable is created.  The executable
ends up looping forever between lines 5 and 7.  Speculation:  The debugging
declarative is attempting to debug itself.

        identification      division.
        program-id.         prog.
        procedure           division.
        declaratives.
        debug-all-procs section.
        use for debugging on all procedures.
        debug-all-0.
            display "In debug declarative.".
        end declaratives.
        main                section.
            display "hello".
        end program prog.

This next version is identical, but with the "main section." line commented
out.  This one parses, compiles, and executes, displaying "hello".  I am not
sure what's supposed to happen, but something isn't right.  I titled it "No
warning", because I don't know we actually implemented "use for debugging".

        identification      division.
        program-id.         prog.
        procedure           division.
        declaratives.
        debug-all-procs section.
        use for debugging on all procedures.
        debug-all-0.
            display "In debug declarative.".
        end declaratives.
      *>  main                section.
            display "hello".
        end program prog.

Reply via email to