https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118939
--- Comment #3 from Nicolas Boulenguez <nicolas at debian dot org> ---
The segmentation fault disappears if either -fstack-check or -O1 is removed.
(gdb) run
Starting program: /home/nicolas/runner
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabi/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0xf7f9a2f8 in system.pool_global.global_pool_object () from
/lib/arm-linux-gnueabi/libgnat-14.so
(gdb) bt
#0 0xf7f9a2f8 in system.pool_global.global_pool_object () from
/lib/arm-linux-gnueabi/libgnat-14.so
#1 0xf7eef2ac in system.storage_pools.subpools.allocate_any_controlled
(pool=..., context_subpool=<optimized out>, context_master=<optimized out>,
fin_address=0xf7f9a2f8 <system.pool_global.global_pool_object>,
storage_size=1714523404, alignment=1852411464, is_controlled=164,
on_subpool=true)
at s-stposu.adb:326
#2 0xfffef5a4 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)