https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120767
James K. Lowden <jklowden at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jklowden at gcc dot gnu.org Ever confirmed|0 |1 Status|UNCONFIRMED |WAITING Last reconfirmed| |2025-07-10 Assignee|unassigned at gcc dot gnu.org |jklowden at gcc dot gnu.org --- Comment #1 from James K. Lowden <jklowden at gcc dot gnu.org> --- Hopefully this PR is resolved by a $10 solution to a $0.10 problem, namely 3f59a1cac717f8af84e884e9ec0f6ef14e102e6e, which adds >>PUSH and >>POP. The format-detection heuristic can still be fooled by -include and, worse, the included file might cause the heuristic to guess the format from the included file, not the main one. This update specifically begins the included file with >>PUSH SOURCE FORMAT and ends with >>POP SOURCE FORMAT. The heuristic might still go awry; I made no effort to restore the state to "indeterminate". But if the command-line uses, say, -ffree-form -include udf/stored-char-length.cbl the result should be 1. free format is set before any file is read 2. udf/stored-char-length.cbl - pushes free format - sets fixed format - processes the file - pops back to free format 3. the first file on the command line is then processed as free format. If that doesn't work, we have more work to do. In fact, we always have more work to do. Let me know. :-)