[Bug ada/126553] New: Compiler error with -gnateV.

"p.p11 at orange dot fr via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126553

            Bug ID: 126553
           Summary: Compiler error with -gnateV.
           Product: gcc
           Version: 16.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: p.p11 at orange dot fr
                CC: dkm at gcc dot gnu.org
  Target Milestone: ---

Created attachment 65197
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65197&action=edit
Reproducer.

Actual behavior:
(Full source files in attached archive)

% gcc -c posix-timers.adb
# Compilation ok

% gcc -c -gnateV posix-timers.adb
+===========================GNAT BUG DETECTED==============================+
| 16.1.0 (x86_64-apple-darwin24.6.0) Constraint_Error erroneous memory access|
| Error detected at posix-timers.ads:70:13                                 |
| Compiling posix-timers.adb                          |
# Compilation error with -gnateV option.

Expected behavior:
Compilation OK with -gnateV option.

Note:
Maybe related to Bug 123857 as there is an Unchecked_Union in posix-c.ads:
570.    type sigval (Dummy : Boolean := True) is record
571.       case Dummy is
572.          when True  => sival_int : int;
573.          when False => sival_ptr : System.Address;
574.       end case;
575.    end record;
576.    pragma Unchecked_Union (sigval);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.