https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122246
Bug ID: 122246
Summary: Multitasking Ravenscar program unexpectedly exits when
including Timing_Event
Product: gcc
Version: 14.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
Assignee: unassigned at gcc dot gnu.org
Reporter: mattiabottaro9 at gmail dot com
CC: dkm at gcc dot gnu.org
Target Milestone: ---
Created attachment 62540
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62540&action=edit
It contains the collection of the source code. Just unzip and run gnatmake
-Isrc/safety_critical/ src/main.adb in the root
The attached multitasking Ravenscar program is expected to run forever and
print:
Task_Read
Hello world!
Task_Read
Task_Read
... and so on...
but it unexpectedly exits as soon as the main hits its end.
When the inclusion of Ada.Real_Time.Timing_Events; on row 8 of
src/safety_critical/safe_components.adb is commented, the program behave as
expected (it never ends). The same happen when Ada.Real_Time.Timing_Events; is
with'ed but all the occurence of pragma Profile (Ravenscar); are removed from
each source file.
with Ada.Exceptions; use Ada.Exceptions;
-- with Ada.Real_Time.Timing_Events; use Ada.Real_Time.Timing_Events;
package body Safe_Components is
- the exact version of GCC, as shown by "gcc -v": gcc version 14.2.0 (Debian
14.2.0-19)
- the system type: a desktop application on Debian. uname -a get the following:
Linux mattiabott 6.12.48+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.48-1
(2025-09-20) x86_64 GNU/Linux
- the options when GCC was configured/built: ../src/configure -v
--with-pkgversion='Debian 14.2.0-19'
--with-bugurl=file:///usr/share/doc/gcc-14/README.Bugs
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2,rust --prefix=/usr
--with-gcc-major-version-only --program-suffix=-14
--program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/libexec --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-libstdcxx-backtrace
--enable-gnu-unique-object --disable-vtable-verify --enable-plugin
--enable-default-pie --with-system-zlib --enable-libphobos-checking=release
--with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch
--disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
--enable-offload-targets=nvptx-none=/build/reproducible-path/gcc-14-14.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/reproducible-path/gcc-14-14.2.0/debian/tmp-gcn/usr
--enable-offload-defaulted --without-cuda-driver --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
--with-build-config=bootstrap-lto-lean --enable-link-serialization=3
- the exact command line passed to the gcc program triggering the bug: -c
-Isrc/ -Isrc/safety_critical/ -I-