)]}'
{
  "commit": "3cf9262ae2c9cbefd40f2f9da0258b79c7f749af",
  "tree": "38f8e3193bac37aaa233f67c88da761771744aac",
  "parents": [
    "9e563150a3a9f5c7034d4afc996627e1f681fde5"
  ],
  "author": {
    "name": "Jerry DeLisle",
    "email": "jvdelisle@gcc.gnu.org",
    "time": "Wed Jul 08 10:22:04 2026 -0700"
  },
  "committer": {
    "name": "Jerry DeLisle",
    "email": "jvdelisle@gcc.gnu.org",
    "time": "Thu Jul 09 18:00:21 2026 -0700"
  },
  "message": "fortran: [PR126116] Internal file I/O corrupts NEWUNIT state\n\nBefore this fix, Performing an internal file I/O\n(such as WRITE to a character variable) incorrectly corrupts\nthe internal unit management table in libgfortran.\n\nThis patch adds a bool to the gfc_unit structure to allow\ntracking whether a gfc_unit was created for purposes of\ninternal I/O to avoid the breakage.\n\n\tPR libfortran/126116\n\nlibgfortran/ChangeLog:\n\n\t* io/io.h (struct gfc_unit): Add bool for tracking.\n\tFix some white space problems.\n\t* io/unit.c (close_unit_1): Add a declaration for this\n\tfunction so it can be called before it has been defined.\n\tUse the new bool.\n\t(is_internal_reserved): New helper function. Returns true\n\tonly if the unit is not null and the internal unit kind is zero\n\tmeaning its not a character string.\n\t(find_unit): Use the new helper function\n\t(find_or_create_unit): Use the new helper.\n\t(get_unit): Set the new bool.\n\t(close_unit): Update the close_unit_1 argument list.\n\t(close_units): Likewise.\n\ngcc/testsuite/ChangeLog:\n\n\t* gfortran.dg/pr126116.f90: New test.\n\n(cherry picked from commit 11be877aea73b0b26638078908a42dd0f97d81d7)\n",
  "tree_diff": [
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "420584e07dfdae7f231d99d684be33e8baaaf063",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/gfortran.dg/pr126116.f90"
    },
    {
      "type": "modify",
      "old_id": "7928c196f63f2dd32af25612a5716577265f6678",
      "old_mode": 33188,
      "old_path": "libgfortran/io/io.h",
      "new_id": "f4ec625570d67082d088a4344bcff2eaf0544e15",
      "new_mode": 33188,
      "new_path": "libgfortran/io/io.h"
    },
    {
      "type": "modify",
      "old_id": "fac24db014dcd0fb52f3006fc69ae6ab4f17f81d",
      "old_mode": 33188,
      "old_path": "libgfortran/io/unit.c",
      "new_id": "5973cef108cef140672c764619c54cf1f392d6d9",
      "new_mode": 33188,
      "new_path": "libgfortran/io/unit.c"
    }
  ]
}
