https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122008

            Bug ID: 122008
           Summary: ada: miscompile protected type with discriminant
           Product: gcc
           Version: 13.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dvalois01 at gmail dot com
                CC: dkm at gcc dot gnu.org
  Target Milestone: ---

Created attachment 62421
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62421&action=edit
source file showing bug -- minimal

my system:
----------
$ uname -a
Linux langevin 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22
16:52:38 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 24.04.3 LTS
Release:        24.04
Codename:       noble

$ gcc --version
gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

reproduce bug:  (file bug.adb attached)
--------------
$ gnatmake bug 
x86_64-linux-gnu-gcc-13 -c bug.adb
x86_64-linux-gnu-gnatbind-13 -x bug.ali
x86_64-linux-gnu-gnatlink-13 bug.ali
$ ./bug

raised STORAGE_ERROR : s-intman.adb:136 explicit raise

$ echo $?
1

description:
------------
gcc generates a bad memory access for an array of a protected type with
discriminant (line 12).

Reply via email to