# Flyology GNAT Patchsets

**URL:** https://forum.ada-lang.io/t/flyology-gnat-patchsets/4627
**Category:** Releases
**Created:** [August 9, 2026, 4:01pm UTC](https://forum.ada-lang.io/t/flyology-gnat-patchsets/4627 "2026-08-09T16:01:10Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![yrashk](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/yrashk/32/1051_2.png) [@yrashk](https://forum.ada-lang.io/u/yrashk)
#### Post date: [August 9, 2026, 4:01pm UTC](https://forum.ada-lang.io/t/flyology-gnat-patchsets/4627/1 "2026-08-09T16:01:10Z")

</div>

I’d like to share [Flyology GNAT Patchsets](https://github.com/flyology-ada/gnat-patches), a project that curates reproducible GCC/GNAT fixes while they are being reviewed or backported upstream.

Patchset 1.1.0 already includes fixes for:

- **Storage-model component actuals:** GNAT 14–16 could bypass `Copy_From` and `Copy_To` for selected, indexed, or sliced values reached through an access type with a custom `Designated_Storage_Model`.

- **Lock-free protected `Duration` values:** with validity checking enabled, GNAT 13–16 could reject a valid negative `Duration` or even abort during compilation on Linux x86-64, depending on the optimization level.

Each patch includes an executable regression test and is validated against pinned GCC sources. Prebuilt toolchains are available for Linux x86-64, Linux AArch64, and macOS AArch64.

These patches have not yet received extensive upstream review, so they should be considered provisional. However, reproducible source builds and executable regression tests indicate that they address the reported issues without reproducing the original failures.

To try one, first add the Flyology index to Alire:

```ada
alr index --add \
  git+https://github.com/flyology-ada/alire-index.git \
  --name flyology --before community

```

Then select a patched compiler locally in an Alire workspace:

```ada
alr -n toolchain --select --local \
  gnat_flyology_native=16.1.0-patchset.1.1.0

```

Versions based on GNAT 13.2, 14.2, 15.3, and 16.1 are available. The selection is workspace-local, so it does not replace your default Alire toolchain.

Feedback and reports from real-world projects are very welcome.

---

<div class="post-metadata">

### Author: ![yrashk](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/yrashk/32/1051_2.png) [@yrashk](https://forum.ada-lang.io/u/yrashk)
#### Post date: [August 9, 2026, 4:49pm UTC](https://forum.ada-lang.io/t/flyology-gnat-patchsets/4627/2 "2026-08-09T16:49:37Z")

</div>

For a more concrete view, these are the failures from a programmer’s perspective.

### 1. Components in custom storage models

Assume `Arena` implements a `Storage_Model_Type` and stores designated objects outside normal native memory:

```ada
type Node;
type Node_Pointer is access Node
  with Designated_Storage_Model => Arena;

type Node is record
   Value : Integer;
   Next : Node_Pointer;
end record;

P : Node_Pointer := new Node'(Value => 10, Next => null);

procedure Consume (Value : Integer) is
begin
   null;
end Consume;

```

Accessing the complete object works:

```ada
Consume_Node (P.all); -- Copy_From is called

```

But on GNAT 14–16, passing one of its components can fail:

```ada
Consume (P.Value);

```

GNAT treats `P.Value` like an ordinary native-memory access instead of obtaining it through the storage model’s `Copy_From`. In the regression, this raises `CONSTRAINT_ERROR` due to an erroneous memory access.

The same problem affects indexed components and `in out` copy-back:

```ada
Consume (A (2));
Increment (P.Value);

```

The patch makes these forms use `Copy_From` and, when needed, `Copy_To`. The [complete executable regression](https://github.com/flyology-ada/gnat-patches/blob/0e5073965f2c054acd2c835a28bb97e5bcfe53d8/bundles/storage-model-actuals/tests/storage_model_actuals.adb) covers selected, indexed, nested, and `in out` actuals.

### 2. Negative `Duration` in a protected object

This one has a much smaller reproducer:

```ada
procedure Protected_Duration_Validity is
   protected Control is
      procedure Set (Value : Duration);
      function Get return Duration;
   private
      Current : Duration := 0.0;
   end Control;

   protected body Control is
      procedure Set (Value : Duration) is
      begin
         Current := Value;
      end Set;

      function Get return Duration is
      begin
         return Current;
      end Get;
   end Control;
begin
   Control.Set (-1.0); -- Valid Duration value
end Protected_Duration_Validity;

```

On Linux x86-64 with validity checking enabled:

```ada
gnatmake -O0 -gnatVa protected_duration_validity.adb

```

The program builds but raises `CONSTRAINT_ERROR: invalid data` when assigning the valid negative value.

With optimization:

```ada
gnatmake -O2 -gnatVa protected_duration_validity.adb

```

GNAT 13–16 can instead abort inside `fold_convert_loc`, without producing an executable.

The patched compilers build and run the [complete regression](https://github.com/flyology-ada/gnat-patches/blob/0e5073965f2c054acd2c835a28bb97e5bcfe53d8/bundles/protected-duration-validity/tests/protected_duration_validity.adb) successfully at both optimization levels.

---

<div class="post-metadata">

### Author: ![yrashk](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/yrashk/32/1051_2.png) [@yrashk](https://forum.ada-lang.io/u/yrashk)
#### Post date: [August 20, 2026, 4:44pm UTC](https://forum.ada-lang.io/t/flyology-gnat-patchsets/4627/3 "2026-08-20T16:44:10Z")

</div>

To further simplify access to patchsets and what exactly they do, I’ve now published this (autogenerated) website: [https://gnat-patches.flyology.org/](https://gnat-patches.flyology.org/)

---

<div class="post-metadata">

### Author: ![Nordic\_Dogsledding](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/nordic_dogsledding/32/547_2.png) [@Nordic\_Dogsledding](https://forum.ada-lang.io/u/Nordic_Dogsledding)
#### Post date: [August 20, 2026, 6:34pm UTC](https://forum.ada-lang.io/t/flyology-gnat-patchsets/4627/4 "2026-08-20T18:34:31Z")

</div>

> [@yrashk](#):
>
> website: [https://gnat-patches.flyology.org/](https://gnat-patches.flyology.org/)

Trying to access this page, Bitdefender blocks:

# Web Protection by Bitdefender

## Phishing page blocked for your protection

> **[GNAT patches](https://gnat-patches.flyology.org/)**
>
> GCC and GNAT patch bundles with executable regressions, validated against pinned GCC source releases.

Phishing pages attempt to obtain sensitive information such as login credentials or credit card details by disguising as trustworthy entities. The stolen data can be then used for financial gain.

---

<div class="post-metadata">

### Author: ![yrashk](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/yrashk/32/1051_2.png) [@yrashk](https://forum.ada-lang.io/u/yrashk)
#### Post date: [August 20, 2026, 6:50pm UTC](https://forum.ada-lang.io/t/flyology-gnat-patchsets/4627/5 "2026-08-20T18:50:54Z")

</div>

Interesting, would be curious to see what set Bitdefender off. Using their public checker gives no details 🤷

EDITED: seems [Bitdefender Link Checker - Is this URL safe?](https://www.bitdefender.com/en-ca/consumer/link-checker) is not flagging this anymore.

---

<div class="post-metadata">

### Author: ![Nordic\_Dogsledding](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/nordic_dogsledding/32/547_2.png) [@Nordic\_Dogsledding](https://forum.ada-lang.io/u/Nordic_Dogsledding)
#### Post date: [August 21, 2026, 1:36pm UTC](https://forum.ada-lang.io/t/flyology-gnat-patchsets/4627/6 "2026-08-21T13:36:10Z")

</div>

Funny, Bitdefender now:

# So far, so good

**No suspicious activity found with this link.**
