{
  "bundle": {
    "affected_versions": [
      "13.2.0",
      "14.2.0",
      "15.1.0"
    ],
    "application_command": "./scripts/apply-bundle.sh controlled-subpool-allocator GCC_VERSION SOURCE",
    "build_command": "PATH=/path/to/bootstrap/bin:$PATH ./scripts/build-gnat.sh SOURCE BUILD INSTALL",
    "directory": "bundles/controlled-subpool-allocator",
    "expected_failure_before_patch": "At -O0 and -O2, allocation of a controlled aggregate in an explicitly named subpool raises PROGRAM_ERROR from System.Storage_Pools.Subpools.Default_Subpool_For_Pool because the generated custom allocator passes a null subpool.",
    "expected_success_after_patch": "At -O0 and -O2, the plain object and both controlled objects allocate in the named subpool, each subpool selector is evaluated once, and releasing the subpool finalizes both controlled objects exactly once.",
    "files_modified": [
      "gcc/ada/exp_ch4.adb",
      "gcc/testsuite/gnat.dg/controlled_subpool_allocator.adb"
    ],
    "fixture_sha256": "b48022218005001c318f3ea582d4c130e42a145c043f8afc9579b8032755ecb0",
    "id": "controlled-subpool-allocator",
    "introduced_in_patchset": "1.2.0",
    "known_good_versions": [
      "15.3.0",
      "16.1.0",
      "16.2.0"
    ],
    "licensing": "GCC-derived compiler hunks remain GPL-3.0-or-later. The new test is proposed for the GCC testsuite under GCC project terms.",
    "patch_statistics": {
      "gcc-13-14": {
        "additions": 164,
        "deletions": 0,
        "files": 2
      },
      "gcc-15.1": {
        "additions": 149,
        "deletions": 2,
        "files": 2
      }
    },
    "problem": "Controlled aggregate allocators drop an explicitly named subpool while synthesizing their custom allocation procedure.",
    "readme_path": "bundles/controlled-subpool-allocator/README.md",
    "regression_tests": [
      "gcc/testsuite/gnat.dg/controlled_subpool_allocator.adb"
    ],
    "repository_fixture": "bundles/controlled-subpool-allocator/tests/controlled_subpool_allocator.adb",
    "repository_test_runner": "bundles/controlled-subpool-allocator/run-test.sh",
    "roles": {
      "1.0.0": {
        "13.2.0": {
          "gcc_major": 13,
          "role": "absent",
          "source_version": "13.2.0",
          "variant": null
        },
        "14.2.0": {
          "gcc_major": 14,
          "role": "absent",
          "source_version": "14.2.0",
          "variant": null
        },
        "15.3.0": {
          "gcc_major": 15,
          "role": "absent",
          "source_version": "15.3.0",
          "variant": null
        },
        "16.1.0": {
          "gcc_major": 16,
          "role": "absent",
          "source_version": "16.1.0",
          "variant": null
        }
      },
      "1.0.1": {
        "13.2.0": {
          "gcc_major": 13,
          "role": "absent",
          "source_version": "13.2.0",
          "variant": null
        },
        "14.2.0": {
          "gcc_major": 14,
          "role": "absent",
          "source_version": "14.2.0",
          "variant": null
        },
        "15.3.0": {
          "gcc_major": 15,
          "role": "absent",
          "source_version": "15.3.0",
          "variant": null
        },
        "16.1.0": {
          "gcc_major": 16,
          "role": "absent",
          "source_version": "16.1.0",
          "variant": null
        }
      },
      "1.1.0": {
        "13.2.0": {
          "gcc_major": 13,
          "role": "absent",
          "source_version": "13.2.0",
          "variant": null
        },
        "14.2.0": {
          "gcc_major": 14,
          "role": "absent",
          "source_version": "14.2.0",
          "variant": null
        },
        "15.3.0": {
          "gcc_major": 15,
          "role": "absent",
          "source_version": "15.3.0",
          "variant": null
        },
        "16.2.0": {
          "gcc_major": 16,
          "role": "absent",
          "source_version": "16.2.0",
          "variant": null
        }
      },
      "1.1.1": {
        "13.2.0": {
          "gcc_major": 13,
          "role": "absent",
          "source_version": "13.2.0",
          "variant": null
        },
        "14.2.0": {
          "gcc_major": 14,
          "role": "absent",
          "source_version": "14.2.0",
          "variant": null
        },
        "15.3.0": {
          "gcc_major": 15,
          "role": "absent",
          "source_version": "15.3.0",
          "variant": null
        },
        "16.1.0": {
          "gcc_major": 16,
          "role": "absent",
          "source_version": "16.1.0",
          "variant": null
        },
        "16.2.0": {
          "gcc_major": 16,
          "role": "absent",
          "source_version": "16.2.0",
          "variant": null
        }
      },
      "1.2.0": {
        "13.2.0": {
          "gcc_major": 13,
          "role": "patched",
          "source_version": "13.2.0",
          "variant": "gcc-13-14"
        },
        "14.2.0": {
          "gcc_major": 14,
          "role": "patched",
          "source_version": "14.2.0",
          "variant": "gcc-13-14"
        },
        "15.3.0": {
          "gcc_major": 15,
          "role": "control",
          "source_version": "15.3.0",
          "variant": null
        },
        "16.2.0": {
          "gcc_major": 16,
          "role": "control",
          "source_version": "16.2.0",
          "variant": null
        }
      }
    },
    "schema": 1,
    "source_provenance": "Narrow backport of GCC commit 5dd4b922bb341aa3b821e600ff2e46aa6ed6e850, derived against and verified on the pinned GCC 13.2.0, 14.2.0, and 15.1.0 FSF and Darwin sources.",
    "standalone_patch": true,
    "status": "accepted",
    "test_command": "./scripts/run-regressions.sh INSTALL 1.2.0 GCC_MAJOR patched",
    "tests": [
      "bundles/controlled-subpool-allocator/tests/controlled_subpool_allocator.adb"
    ],
    "title": "Controlled allocator named subpools",
    "upstream_issue": "https://github.com/flyology-ada/flyology/issues/220",
    "upstream_submission_state": "Fixed upstream by GCC commit 5dd4b922bb341aa3b821e600ff2e46aa6ed6e850; this bundle is the focused backport for the exact affected GCC 13.2.0, 14.2.0, and 15.1.0 sources.",
    "variants": [
      {
        "id": "gcc-13-14",
        "patch": "bundles/controlled-subpool-allocator/patches/gcc-13-14.patch",
        "sha256": "b4b33ed8436718ae87efd8acc286b43f611c8801d97518c108832adbd2de3489",
        "source_flavors": [
          "linux",
          "darwin_arm64"
        ],
        "versions": [
          "13.2.0",
          "14.2.0"
        ]
      },
      {
        "id": "gcc-15.1",
        "patch": "bundles/controlled-subpool-allocator/patches/gcc-15.1.patch",
        "sha256": "fa8a454e2070507cae4585ef4887c26b13ffe071f42cf6477817826449851660",
        "source_flavors": [
          "linux",
          "darwin_arm64"
        ],
        "versions": [
          "15.1.0"
        ]
      }
    ]
  },
  "canonical_url": "https://gnat-patches.flyology.org/",
  "generated_at": "2026-09-16T15:43:45Z",
  "latest_patchset": "1.2.0",
  "latest_published_patchset": "1.1.1",
  "publication_checked": true,
  "repository_url": "https://github.com/flyology-ada/gnat-patches",
  "schema_version": 2
}
