https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64866
--- Comment #1 from simon at pushface dot org ---
This bug appears to be triggered because the RTS contains freertos.ads with
private with Interfaces;
package FreeRTOS with Pure is
...
s-taprob.ads and s-tposen.ads start with
private with FreeRTOS.Mutexes;
and
private with FreeRTOS.Queues;
respectively, so anything to do with protected types (or tasks) is going to
call in FreeRTOS.
If I remove the private, so I just have
with Interfaces;
package FreeRTOS with Pure is
...
then the bug goes away.
See also PR64548, with a similar problem and a similar workround.
I note that a-cobove.ads has a private with of Ada.Streams; might this lead to
similar problems?